<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE GADTs, RecordWildCards, MagicHash, ScopedTypeVariables, CPP,
    UnboxedTuples #-}</span><span>
</span><span id="line-3"></span><span class="hs-pragma">{-# OPTIONS_GHC -fno-warn-name-shadowing #-}</span><span>
</span><span id="line-4"></span><span>
</span><span id="line-5"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-6"></span><span class="hs-comment">-- Execute GHCi messages.</span><span>
</span><span id="line-7"></span><span class="hs-comment">--</span><span>
</span><span id="line-8"></span><span class="hs-comment">-- For details on Remote GHCi, see Note [Remote GHCi] in</span><span>
</span><span id="line-9"></span><span class="hs-comment">-- compiler/GHC/Runtime/Interpreter.hs.</span><span>
</span><span id="line-10"></span><span class="hs-comment">--</span><span>
</span><span id="line-11"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHCi.Run</span><span>
</span><span id="line-12"></span><span>  </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHCi.Run.html#run"><span class="hs-identifier">run</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHCi.Run.html#redirectInterrupts"><span class="hs-identifier">redirectInterrupts</span></a></span><span>
</span><span id="line-13"></span><span>  </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-14"></span><span>
</span><span id="line-15"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Prelude.html#"><span class="hs-identifier">Prelude</span></a></span><span> </span><span class="hs-comment">-- See note [Why do we import Prelude here?]</span><span>
</span><span id="line-16"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHCi.CreateBCO.html"><span class="hs-identifier">GHCi.CreateBCO</span></a></span><span>
</span><span id="line-17"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHCi.InfoTable.html"><span class="hs-identifier">GHCi.InfoTable</span></a></span><span>
</span><span id="line-18"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHCi.FFI.html"><span class="hs-identifier">GHCi.FFI</span></a></span><span>
</span><span id="line-19"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHCi.Message.html"><span class="hs-identifier">GHCi.Message</span></a></span><span>
</span><span id="line-20"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHCi.ObjLink.html"><span class="hs-identifier">GHCi.ObjLink</span></a></span><span>
</span><span id="line-21"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHCi.RemoteTypes.html"><span class="hs-identifier">GHCi.RemoteTypes</span></a></span><span>
</span><span id="line-22"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHCi.TH.html"><span class="hs-identifier">GHCi.TH</span></a></span><span>
</span><span id="line-23"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHCi.BreakArray.html"><span class="hs-identifier">GHCi.BreakArray</span></a></span><span>
</span><span id="line-24"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHCi.StaticPtrTable.html"><span class="hs-identifier">GHCi.StaticPtrTable</span></a></span><span>
</span><span id="line-25"></span><span>
</span><span id="line-26"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Concurrent.html#"><span class="hs-identifier">Control.Concurrent</span></a></span><span>
</span><span id="line-27"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../deepseq/src/Control.DeepSeq.html#"><span class="hs-identifier">Control.DeepSeq</span></a></span><span>
</span><span id="line-28"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Exception.html#"><span class="hs-identifier">Control.Exception</span></a></span><span>
</span><span id="line-29"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.html#"><span class="hs-identifier">Control.Monad</span></a></span><span>
</span><span id="line-30"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../binary/src/Data.Binary.html#"><span class="hs-identifier">Data.Binary</span></a></span><span>
</span><span id="line-31"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../binary/src/Data.Binary.Get.html#"><span class="hs-identifier">Data.Binary.Get</span></a></span><span>
</span><span id="line-32"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.html#"><span class="hs-identifier">Data.ByteString</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Internal.html#ByteString"><span class="hs-identifier">ByteString</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-33"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Unsafe.html#"><span class="hs-identifier">Data.ByteString.Unsafe</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">B</span></span><span>
</span><span id="line-34"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/GHC.Exts.html#"><span class="hs-identifier">GHC.Exts</span></a></span><span>
</span><span id="line-35"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../ghc-heap/src/GHC.Exts.Heap.html#"><span class="hs-identifier">GHC.Exts.Heap</span></a></span><span>
</span><span id="line-36"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/GHC.Stack.html#"><span class="hs-identifier">GHC.Stack</span></a></span><span>
</span><span id="line-37"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Foreign.html#"><span class="hs-identifier">Foreign</span></a></span><span> </span><span class="hs-keyword">hiding</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Foreign.Marshal.Error.html#void"><span class="hs-identifier">void</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-38"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Foreign.C.html#"><span class="hs-identifier">Foreign.C</span></a></span><span>
</span><span id="line-39"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/GHC.Conc.Sync.html#"><span class="hs-identifier">GHC.Conc.Sync</span></a></span><span>
</span><span id="line-40"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#"><span class="hs-identifier">GHC.IO</span></a></span><span> </span><span class="hs-keyword">hiding</span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#bracket"><span class="hs-identifier">bracket</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-41"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/System.Mem.Weak.html#"><span class="hs-identifier">System.Mem.Weak</span></a></span><span>  </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="../../base/src/GHC.Weak.html#deRefWeak"><span class="hs-identifier">deRefWeak</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-42"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Unsafe.Coerce.html#"><span class="hs-identifier">Unsafe.Coerce</span></a></span><span>
</span><span id="line-43"></span><span>
</span><span id="line-44"></span><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-45"></span><span class="hs-comment">-- Implement messages</span><span>
</span><span id="line-46"></span><span>
</span><span id="line-47"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-string">&quot;revertCAFs&quot;</span></span><span> </span><span id="rts_revertCAFs"><span class="annot"><a href="GHCi.Run.html#rts_revertCAFs"><span class="hs-identifier hs-var">rts_revertCAFs</span></a></span></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-48"></span><span>        </span><span class="hs-comment">-- Make it &quot;safe&quot;, just in case</span><span>
</span><span id="line-49"></span><span>
</span><span id="line-50"></span><span id="local-6989586621679097452"><span class="annot"><a href="GHCi.Run.html#run"><span class="hs-identifier hs-type">run</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHCi.Message.html#Message"><span class="hs-identifier hs-type">Message</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097452"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="#local-6989586621679097452"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-51"></span><span id="run"><span class="annot"><span class="annottext">run :: forall a. Message a -&gt; IO a
</span><a href="GHCi.Run.html#run"><span class="hs-identifier hs-var hs-var">run</span></a></span></span><span> </span><span id="local-6989586621679097247"><span class="annot"><span class="annottext">Message a
</span><a href="#local-6989586621679097247"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Message a
</span><a href="#local-6989586621679097247"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-52"></span><span>  </span><span class="annot"><span class="annottext">Message a
</span><a href="GHCi.Message.html#InitLinker"><span class="hs-identifier hs-var">InitLinker</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ShouldRetainCAFs -&gt; IO ()
</span><a href="GHCi.ObjLink.html#initObjLinker"><span class="hs-identifier hs-var">initObjLinker</span></a></span><span> </span><span class="annot"><span class="annottext">ShouldRetainCAFs
</span><a href="GHCi.ObjLink.html#RetainCAFs"><span class="hs-identifier hs-var">RetainCAFs</span></a></span><span>
</span><span id="line-53"></span><span>  </span><span class="annot"><span class="annottext">Message a
</span><a href="GHCi.Message.html#RtsRevertCAFs"><span class="hs-identifier hs-var">RtsRevertCAFs</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">IO a
IO ()
</span><a href="GHCi.Run.html#rts_revertCAFs"><span class="hs-identifier hs-var">rts_revertCAFs</span></a></span><span>
</span><span id="line-54"></span><span>  </span><span class="annot"><a href="GHCi.Message.html#LookupSymbol"><span class="hs-identifier hs-type">LookupSymbol</span></a></span><span> </span><span id="local-6989586621679097234"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679097234"><span class="hs-identifier hs-var">str</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(Ptr () -&gt; RemotePtr ()) -&gt; Maybe (Ptr ()) -&gt; Maybe (RemotePtr ())
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr () -&gt; RemotePtr ()
forall a. Ptr a -&gt; RemotePtr a
</span><a href="GHCi.RemoteTypes.html#toRemotePtr"><span class="hs-identifier hs-var">toRemotePtr</span></a></span><span> </span><span class="annot"><span class="annottext">(Maybe (Ptr ()) -&gt; Maybe (RemotePtr ()))
-&gt; IO (Maybe (Ptr ())) -&gt; IO (Maybe (RemotePtr ()))
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; IO (Maybe (Ptr ()))
forall a. String -&gt; IO (Maybe (Ptr a))
</span><a href="GHCi.ObjLink.html#lookupSymbol"><span class="hs-identifier hs-var">lookupSymbol</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679097234"><span class="hs-identifier hs-var">str</span></a></span><span>
</span><span id="line-55"></span><span>  </span><span class="annot"><a href="GHCi.Message.html#LookupClosure"><span class="hs-identifier hs-type">LookupClosure</span></a></span><span> </span><span id="local-6989586621679097228"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679097228"><span class="hs-identifier hs-var">str</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; IO (Maybe HValueRef)
</span><a href="GHCi.ObjLink.html#lookupClosure"><span class="hs-identifier hs-var">lookupClosure</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679097228"><span class="hs-identifier hs-var">str</span></a></span><span>
</span><span id="line-56"></span><span>  </span><span class="annot"><a href="GHCi.Message.html#LoadDLL"><span class="hs-identifier hs-type">LoadDLL</span></a></span><span> </span><span id="local-6989586621679097224"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679097224"><span class="hs-identifier hs-var">str</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; IO (Maybe String)
</span><a href="GHCi.ObjLink.html#loadDLL"><span class="hs-identifier hs-var">loadDLL</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679097224"><span class="hs-identifier hs-var">str</span></a></span><span>
</span><span id="line-57"></span><span>  </span><span class="annot"><a href="GHCi.Message.html#LoadArchive"><span class="hs-identifier hs-type">LoadArchive</span></a></span><span> </span><span id="local-6989586621679097220"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679097220"><span class="hs-identifier hs-var">str</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; IO ()
</span><a href="GHCi.ObjLink.html#loadArchive"><span class="hs-identifier hs-var">loadArchive</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679097220"><span class="hs-identifier hs-var">str</span></a></span><span>
</span><span id="line-58"></span><span>  </span><span class="annot"><a href="GHCi.Message.html#LoadObj"><span class="hs-identifier hs-type">LoadObj</span></a></span><span> </span><span id="local-6989586621679097216"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679097216"><span class="hs-identifier hs-var">str</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; IO ()
</span><a href="GHCi.ObjLink.html#loadObj"><span class="hs-identifier hs-var">loadObj</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679097216"><span class="hs-identifier hs-var">str</span></a></span><span>
</span><span id="line-59"></span><span>  </span><span class="annot"><a href="GHCi.Message.html#UnloadObj"><span class="hs-identifier hs-type">UnloadObj</span></a></span><span> </span><span id="local-6989586621679097212"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679097212"><span class="hs-identifier hs-var">str</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; IO ()
</span><a href="GHCi.ObjLink.html#unloadObj"><span class="hs-identifier hs-var">unloadObj</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679097212"><span class="hs-identifier hs-var">str</span></a></span><span>
</span><span id="line-60"></span><span>  </span><span class="annot"><a href="GHCi.Message.html#AddLibrarySearchPath"><span class="hs-identifier hs-type">AddLibrarySearchPath</span></a></span><span> </span><span id="local-6989586621679097207"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679097207"><span class="hs-identifier hs-var">str</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Ptr () -&gt; RemotePtr ()
forall a. Ptr a -&gt; RemotePtr a
</span><a href="GHCi.RemoteTypes.html#toRemotePtr"><span class="hs-identifier hs-var">toRemotePtr</span></a></span><span> </span><span class="annot"><span class="annottext">(Ptr () -&gt; RemotePtr ()) -&gt; IO (Ptr ()) -&gt; IO (RemotePtr ())
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; IO (Ptr ())
</span><a href="GHCi.ObjLink.html#addLibrarySearchPath"><span class="hs-identifier hs-var">addLibrarySearchPath</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679097207"><span class="hs-identifier hs-var">str</span></a></span><span>
</span><span id="line-61"></span><span>  </span><span class="annot"><a href="GHCi.Message.html#RemoveLibrarySearchPath"><span class="hs-identifier hs-type">RemoveLibrarySearchPath</span></a></span><span> </span><span id="local-6989586621679097203"><span class="annot"><span class="annottext">RemotePtr ()
</span><a href="#local-6989586621679097203"><span class="hs-identifier hs-var">ptr</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Ptr () -&gt; IO Bool
</span><a href="GHCi.ObjLink.html#removeLibrarySearchPath"><span class="hs-identifier hs-var">removeLibrarySearchPath</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RemotePtr () -&gt; Ptr ()
forall a. RemotePtr a -&gt; Ptr a
</span><a href="GHCi.RemoteTypes.html#fromRemotePtr"><span class="hs-identifier hs-var">fromRemotePtr</span></a></span><span> </span><span class="annot"><span class="annottext">RemotePtr ()
</span><a href="#local-6989586621679097203"><span class="hs-identifier hs-var">ptr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-62"></span><span>  </span><span class="annot"><span class="annottext">Message a
</span><a href="GHCi.Message.html#ResolveObjs"><span class="hs-identifier hs-var">ResolveObjs</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">IO a
IO Bool
</span><a href="GHCi.ObjLink.html#resolveObjs"><span class="hs-identifier hs-var">resolveObjs</span></a></span><span>
</span><span id="line-63"></span><span>  </span><span class="annot"><a href="GHCi.Message.html#FindSystemLibrary"><span class="hs-identifier hs-type">FindSystemLibrary</span></a></span><span> </span><span id="local-6989586621679097195"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679097195"><span class="hs-identifier hs-var">str</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; IO (Maybe String)
</span><a href="GHCi.ObjLink.html#findSystemLibrary"><span class="hs-identifier hs-var">findSystemLibrary</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679097195"><span class="hs-identifier hs-var">str</span></a></span><span>
</span><span id="line-64"></span><span>  </span><span class="annot"><a href="GHCi.Message.html#CreateBCOs"><span class="hs-identifier hs-type">CreateBCOs</span></a></span><span> </span><span id="local-6989586621679097185"><span class="annot"><span class="annottext">[ByteString]
</span><a href="#local-6989586621679097185"><span class="hs-identifier hs-var">bcos</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[ResolvedBCO] -&gt; IO [HValueRef]
</span><a href="GHCi.CreateBCO.html#createBCOs"><span class="hs-identifier hs-var">createBCOs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(ByteString -&gt; [ResolvedBCO]) -&gt; [ByteString] -&gt; [ResolvedBCO]
forall (t :: * -&gt; *) a b. Foldable t =&gt; (a -&gt; [b]) -&gt; t a -&gt; [b]
</span><a href="../../base/src/Data.Foldable.html#concatMap"><span class="hs-identifier hs-var">concatMap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Get [ResolvedBCO] -&gt; ByteString -&gt; [ResolvedBCO]
forall a. Get a -&gt; ByteString -&gt; a
</span><a href="../../binary/src/Data.Binary.Get.html#runGet"><span class="hs-identifier hs-var">runGet</span></a></span><span> </span><span class="annot"><span class="annottext">Get [ResolvedBCO]
forall t. Binary t =&gt; Get t
</span><a href="../../binary/src/Data.Binary.Class.html#get"><span class="hs-identifier hs-var">get</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[ByteString]
</span><a href="#local-6989586621679097185"><span class="hs-identifier hs-var">bcos</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-65"></span><span>  </span><span class="annot"><a href="GHCi.Message.html#FreeHValueRefs"><span class="hs-identifier hs-type">FreeHValueRefs</span></a></span><span> </span><span id="local-6989586621679097176"><span class="annot"><span class="annottext">[HValueRef]
</span><a href="#local-6989586621679097176"><span class="hs-identifier hs-var">rs</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(HValueRef -&gt; IO ()) -&gt; [HValueRef] -&gt; IO ()
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Foldable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m ()
</span><a href="../../base/src/Data.Foldable.html#mapM_"><span class="hs-identifier hs-var">mapM_</span></a></span><span> </span><span class="annot"><span class="annottext">HValueRef -&gt; IO ()
forall a. RemoteRef a -&gt; IO ()
</span><a href="GHCi.RemoteTypes.html#freeRemoteRef"><span class="hs-identifier hs-var">freeRemoteRef</span></a></span><span> </span><span class="annot"><span class="annottext">[HValueRef]
</span><a href="#local-6989586621679097176"><span class="hs-identifier hs-var">rs</span></a></span><span>
</span><span id="line-66"></span><span>  </span><span class="annot"><a href="GHCi.Message.html#AddSptEntry"><span class="hs-identifier hs-type">AddSptEntry</span></a></span><span> </span><span id="local-6989586621679097170"><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621679097170"><span class="hs-identifier hs-var">fpr</span></a></span></span><span> </span><span id="local-6989586621679097169"><span class="annot"><span class="annottext">HValueRef
</span><a href="#local-6989586621679097169"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">HValueRef -&gt; IO HValue
forall a. RemoteRef a -&gt; IO a
</span><a href="GHCi.RemoteTypes.html#localRef"><span class="hs-identifier hs-var">localRef</span></a></span><span> </span><span class="annot"><span class="annottext">HValueRef
</span><a href="#local-6989586621679097169"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">IO HValue -&gt; (HValue -&gt; IO ()) -&gt; IO ()
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; (a -&gt; m b) -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var">&gt;&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Fingerprint -&gt; HValue -&gt; IO ()
</span><a href="GHCi.StaticPtrTable.html#sptAddEntry"><span class="hs-identifier hs-var">sptAddEntry</span></a></span><span> </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621679097170"><span class="hs-identifier hs-var">fpr</span></a></span><span>
</span><span id="line-67"></span><span>  </span><span class="annot"><a href="GHCi.Message.html#EvalStmt"><span class="hs-identifier hs-type">EvalStmt</span></a></span><span> </span><span id="local-6989586621679097164"><span class="annot"><span class="annottext">EvalOpts
</span><a href="#local-6989586621679097164"><span class="hs-identifier hs-var">opts</span></a></span></span><span> </span><span id="local-6989586621679097163"><span class="annot"><span class="annottext">EvalExpr HValueRef
</span><a href="#local-6989586621679097163"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">EvalOpts
-&gt; EvalExpr HValueRef -&gt; IO (EvalStatus_ [HValueRef] [HValueRef])
</span><a href="GHCi.Run.html#evalStmt"><span class="hs-identifier hs-var">evalStmt</span></a></span><span> </span><span class="annot"><span class="annottext">EvalOpts
</span><a href="#local-6989586621679097164"><span class="hs-identifier hs-var">opts</span></a></span><span> </span><span class="annot"><span class="annottext">EvalExpr HValueRef
</span><a href="#local-6989586621679097163"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-68"></span><span>  </span><span class="annot"><a href="GHCi.Message.html#ResumeStmt"><span class="hs-identifier hs-type">ResumeStmt</span></a></span><span> </span><span id="local-6989586621679097159"><span class="annot"><span class="annottext">EvalOpts
</span><a href="#local-6989586621679097159"><span class="hs-identifier hs-var">opts</span></a></span></span><span> </span><span id="local-6989586621679097158"><span class="annot"><span class="annottext">RemoteRef (ResumeContext [HValueRef])
</span><a href="#local-6989586621679097158"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">EvalOpts
-&gt; RemoteRef (ResumeContext [HValueRef])
-&gt; IO (EvalStatus_ [HValueRef] [HValueRef])
</span><a href="GHCi.Run.html#resumeStmt"><span class="hs-identifier hs-var">resumeStmt</span></a></span><span> </span><span class="annot"><span class="annottext">EvalOpts
</span><a href="#local-6989586621679097159"><span class="hs-identifier hs-var">opts</span></a></span><span> </span><span class="annot"><span class="annottext">RemoteRef (ResumeContext [HValueRef])
</span><a href="#local-6989586621679097158"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-69"></span><span>  </span><span class="annot"><a href="GHCi.Message.html#AbandonStmt"><span class="hs-identifier hs-type">AbandonStmt</span></a></span><span> </span><span id="local-6989586621679097154"><span class="annot"><span class="annottext">RemoteRef (ResumeContext [HValueRef])
</span><a href="#local-6989586621679097154"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">RemoteRef (ResumeContext [HValueRef]) -&gt; IO ()
</span><a href="GHCi.Run.html#abandonStmt"><span class="hs-identifier hs-var">abandonStmt</span></a></span><span> </span><span class="annot"><span class="annottext">RemoteRef (ResumeContext [HValueRef])
</span><a href="#local-6989586621679097154"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-70"></span><span>  </span><span class="annot"><a href="GHCi.Message.html#EvalString"><span class="hs-identifier hs-type">EvalString</span></a></span><span> </span><span id="local-6989586621679097150"><span class="annot"><span class="annottext">HValueRef
</span><a href="#local-6989586621679097150"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">HValueRef -&gt; IO (EvalResult String)
</span><a href="GHCi.Run.html#evalString"><span class="hs-identifier hs-var">evalString</span></a></span><span> </span><span class="annot"><span class="annottext">HValueRef
</span><a href="#local-6989586621679097150"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-71"></span><span>  </span><span class="annot"><a href="GHCi.Message.html#EvalStringToString"><span class="hs-identifier hs-type">EvalStringToString</span></a></span><span> </span><span id="local-6989586621679097146"><span class="annot"><span class="annottext">HValueRef
</span><a href="#local-6989586621679097146"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span id="local-6989586621679097145"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679097145"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">HValueRef -&gt; String -&gt; IO (EvalResult String)
</span><a href="GHCi.Run.html#evalStringToString"><span class="hs-identifier hs-var">evalStringToString</span></a></span><span> </span><span class="annot"><span class="annottext">HValueRef
</span><a href="#local-6989586621679097146"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679097145"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-72"></span><span>  </span><span class="annot"><a href="GHCi.Message.html#EvalIO"><span class="hs-identifier hs-type">EvalIO</span></a></span><span> </span><span id="local-6989586621679097141"><span class="annot"><span class="annottext">HValueRef
</span><a href="#local-6989586621679097141"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">HValueRef -&gt; IO (EvalResult ())
</span><a href="GHCi.Run.html#evalIO"><span class="hs-identifier hs-var">evalIO</span></a></span><span> </span><span class="annot"><span class="annottext">HValueRef
</span><a href="#local-6989586621679097141"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-73"></span><span>  </span><span class="annot"><a href="GHCi.Message.html#MkCostCentres"><span class="hs-identifier hs-type">MkCostCentres</span></a></span><span> </span><span id="local-6989586621679097137"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679097137"><span class="hs-identifier hs-var">mod</span></a></span></span><span> </span><span id="local-6989586621679097136"><span class="annot"><span class="annottext">[(String, String)]
</span><a href="#local-6989586621679097136"><span class="hs-identifier hs-var">ccs</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; [(String, String)] -&gt; IO [RemotePtr CostCentre]
</span><a href="GHCi.Run.html#mkCostCentres"><span class="hs-identifier hs-var">mkCostCentres</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679097137"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="annot"><span class="annottext">[(String, String)]
</span><a href="#local-6989586621679097136"><span class="hs-identifier hs-var">ccs</span></a></span><span>
</span><span id="line-74"></span><span>  </span><span class="annot"><a href="GHCi.Message.html#CostCentreStackInfo"><span class="hs-identifier hs-type">CostCentreStackInfo</span></a></span><span> </span><span id="local-6989586621679097132"><span class="annot"><span class="annottext">RemotePtr CostCentreStack
</span><a href="#local-6989586621679097132"><span class="hs-identifier hs-var">ptr</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Ptr CostCentreStack -&gt; IO [String]
</span><a href="../../base/src/GHC.Stack.CCS.html#ccsToStrings"><span class="hs-identifier hs-var">ccsToStrings</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RemotePtr CostCentreStack -&gt; Ptr CostCentreStack
forall a. RemotePtr a -&gt; Ptr a
</span><a href="GHCi.RemoteTypes.html#fromRemotePtr"><span class="hs-identifier hs-var">fromRemotePtr</span></a></span><span> </span><span class="annot"><span class="annottext">RemotePtr CostCentreStack
</span><a href="#local-6989586621679097132"><span class="hs-identifier hs-var">ptr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-75"></span><span>  </span><span class="annot"><a href="GHCi.Message.html#NewBreakArray"><span class="hs-identifier hs-type">NewBreakArray</span></a></span><span> </span><span id="local-6989586621679097127"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679097127"><span class="hs-identifier hs-var">sz</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">BreakArray -&gt; IO (RemoteRef BreakArray)
forall a. a -&gt; IO (RemoteRef a)
</span><a href="GHCi.RemoteTypes.html#mkRemoteRef"><span class="hs-identifier hs-var">mkRemoteRef</span></a></span><span> </span><span class="annot"><span class="annottext">(BreakArray -&gt; IO (RemoteRef BreakArray))
-&gt; IO BreakArray -&gt; IO (RemoteRef BreakArray)
forall (m :: * -&gt; *) a b. Monad m =&gt; (a -&gt; m b) -&gt; m a -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3D%3C%3C"><span class="hs-operator hs-var">=&lt;&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; IO BreakArray
</span><a href="GHCi.BreakArray.html#newBreakArray"><span class="hs-identifier hs-var">newBreakArray</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679097127"><span class="hs-identifier hs-var">sz</span></a></span><span>
</span><span id="line-76"></span><span>  </span><span class="annot"><a href="GHCi.Message.html#EnableBreakpoint"><span class="hs-identifier hs-type">EnableBreakpoint</span></a></span><span> </span><span id="local-6989586621679097118"><span class="annot"><span class="annottext">RemoteRef BreakArray
</span><a href="#local-6989586621679097118"><span class="hs-identifier hs-var">ref</span></a></span></span><span> </span><span id="local-6989586621679097117"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679097117"><span class="hs-identifier hs-var">ix</span></a></span></span><span> </span><span id="local-6989586621679097116"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679097116"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-77"></span><span>    </span><span id="local-6989586621679097115"><span class="annot"><span class="annottext">BreakArray
</span><a href="#local-6989586621679097115"><span class="hs-identifier hs-var">arr</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RemoteRef BreakArray -&gt; IO BreakArray
forall a. RemoteRef a -&gt; IO a
</span><a href="GHCi.RemoteTypes.html#localRef"><span class="hs-identifier hs-var">localRef</span></a></span><span> </span><span class="annot"><span class="annottext">RemoteRef BreakArray
</span><a href="#local-6989586621679097118"><span class="hs-identifier hs-var">ref</span></a></span><span>
</span><span id="line-78"></span><span>    </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679097116"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">BreakArray -&gt; Int -&gt; IO Bool
</span><a href="GHCi.BreakArray.html#setBreakOn"><span class="hs-identifier hs-var">setBreakOn</span></a></span><span> </span><span class="annot"><span class="annottext">BreakArray
</span><a href="#local-6989586621679097115"><span class="hs-identifier hs-var">arr</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679097117"><span class="hs-identifier hs-var">ix</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">BreakArray -&gt; Int -&gt; IO Bool
</span><a href="GHCi.BreakArray.html#setBreakOff"><span class="hs-identifier hs-var">setBreakOff</span></a></span><span> </span><span class="annot"><span class="annottext">BreakArray
</span><a href="#local-6989586621679097115"><span class="hs-identifier hs-var">arr</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679097117"><span class="hs-identifier hs-var">ix</span></a></span><span>
</span><span id="line-79"></span><span>    </span><span class="annot"><span class="annottext">() -&gt; IO ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-80"></span><span>  </span><span class="annot"><a href="GHCi.Message.html#BreakpointStatus"><span class="hs-identifier hs-type">BreakpointStatus</span></a></span><span> </span><span id="local-6989586621679097102"><span class="annot"><span class="annottext">RemoteRef BreakArray
</span><a href="#local-6989586621679097102"><span class="hs-identifier hs-var">ref</span></a></span></span><span> </span><span id="local-6989586621679097101"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679097101"><span class="hs-identifier hs-var">ix</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-81"></span><span>    </span><span id="local-6989586621679097100"><span class="annot"><span class="annottext">BreakArray
</span><a href="#local-6989586621679097100"><span class="hs-identifier hs-var">arr</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RemoteRef BreakArray -&gt; IO BreakArray
forall a. RemoteRef a -&gt; IO a
</span><a href="GHCi.RemoteTypes.html#localRef"><span class="hs-identifier hs-var">localRef</span></a></span><span> </span><span class="annot"><span class="annottext">RemoteRef BreakArray
</span><a href="#local-6989586621679097102"><span class="hs-identifier hs-var">ref</span></a></span><span class="hs-special">;</span><span> </span><span id="local-6989586621679097099"><span class="annot"><span class="annottext">Maybe Word8
</span><a href="#local-6989586621679097099"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">BreakArray -&gt; Int -&gt; IO (Maybe Word8)
</span><a href="GHCi.BreakArray.html#getBreak"><span class="hs-identifier hs-var">getBreak</span></a></span><span> </span><span class="annot"><span class="annottext">BreakArray
</span><a href="#local-6989586621679097100"><span class="hs-identifier hs-var">arr</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679097101"><span class="hs-identifier hs-var">ix</span></a></span><span>
</span><span id="line-82"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Maybe Word8
</span><a href="#local-6989586621679097099"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-83"></span><span>      </span><span class="annot"><span class="annottext">Maybe Word8
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; IO Bool
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-84"></span><span>      </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679097097"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679097097"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; IO Bool
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679097097"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">/=</span></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span>
</span><span id="line-85"></span><span>  </span><span class="annot"><a href="GHCi.Message.html#GetBreakpointVar"><span class="hs-identifier hs-type">GetBreakpointVar</span></a></span><span> </span><span id="local-6989586621679097088"><span class="annot"><span class="annottext">HValueRef
</span><a href="#local-6989586621679097088"><span class="hs-identifier hs-var">ref</span></a></span></span><span> </span><span id="local-6989586621679097087"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679097087"><span class="hs-identifier hs-var">ix</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-86"></span><span>    </span><span id="local-6989586621679097086"><span class="annot"><span class="annottext">HValue
</span><a href="#local-6989586621679097086"><span class="hs-identifier hs-var">aps</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">HValueRef -&gt; IO HValue
forall a. RemoteRef a -&gt; IO a
</span><a href="GHCi.RemoteTypes.html#localRef"><span class="hs-identifier hs-var">localRef</span></a></span><span> </span><span class="annot"><span class="annottext">HValueRef
</span><a href="#local-6989586621679097088"><span class="hs-identifier hs-var">ref</span></a></span><span>
</span><span id="line-87"></span><span>    </span><span class="annot"><span class="annottext">(HValue -&gt; IO HValueRef) -&gt; Maybe HValue -&gt; IO (Maybe HValueRef)
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Traversable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m (t b)
</span><a href="../../base/src/Data.Traversable.html#mapM"><span class="hs-identifier hs-var">mapM</span></a></span><span> </span><span class="annot"><span class="annottext">HValue -&gt; IO HValueRef
forall a. a -&gt; IO (RemoteRef a)
</span><a href="GHCi.RemoteTypes.html#mkRemoteRef"><span class="hs-identifier hs-var">mkRemoteRef</span></a></span><span> </span><span class="annot"><span class="annottext">(Maybe HValue -&gt; IO (Maybe HValueRef))
-&gt; IO (Maybe HValue) -&gt; IO (Maybe HValueRef)
forall (m :: * -&gt; *) a b. Monad m =&gt; (a -&gt; m b) -&gt; m a -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3D%3C%3C"><span class="hs-operator hs-var">=&lt;&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">HValue -&gt; Int -&gt; IO (Maybe HValue)
</span><a href="GHCi.Run.html#getIdValFromApStack"><span class="hs-identifier hs-var">getIdValFromApStack</span></a></span><span> </span><span class="annot"><span class="annottext">HValue
</span><a href="#local-6989586621679097086"><span class="hs-identifier hs-var">aps</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679097087"><span class="hs-identifier hs-var">ix</span></a></span><span>
</span><span id="line-88"></span><span>  </span><span class="annot"><a href="GHCi.Message.html#MallocData"><span class="hs-identifier hs-type">MallocData</span></a></span><span> </span><span id="local-6989586621679097081"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679097081"><span class="hs-identifier hs-var">bs</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; IO (RemotePtr ())
</span><a href="GHCi.Run.html#mkString"><span class="hs-identifier hs-var">mkString</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679097081"><span class="hs-identifier hs-var">bs</span></a></span><span>
</span><span id="line-89"></span><span>  </span><span class="annot"><a href="GHCi.Message.html#MallocStrings"><span class="hs-identifier hs-type">MallocStrings</span></a></span><span> </span><span id="local-6989586621679097075"><span class="annot"><span class="annottext">[ByteString]
</span><a href="#local-6989586621679097075"><span class="hs-identifier hs-var">bss</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(ByteString -&gt; IO (RemotePtr ()))
-&gt; [ByteString] -&gt; IO [RemotePtr ()]
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Traversable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m (t b)
</span><a href="../../base/src/Data.Traversable.html#mapM"><span class="hs-identifier hs-var">mapM</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; IO (RemotePtr ())
</span><a href="GHCi.Run.html#mkString0"><span class="hs-identifier hs-var">mkString0</span></a></span><span> </span><span class="annot"><span class="annottext">[ByteString]
</span><a href="#local-6989586621679097075"><span class="hs-identifier hs-var">bss</span></a></span><span>
</span><span id="line-90"></span><span>  </span><span class="annot"><a href="GHCi.Message.html#PrepFFI"><span class="hs-identifier hs-type">PrepFFI</span></a></span><span> </span><span id="local-6989586621679097070"><span class="annot"><span class="annottext">FFIConv
</span><a href="#local-6989586621679097070"><span class="hs-identifier hs-var">conv</span></a></span></span><span> </span><span id="local-6989586621679097069"><span class="annot"><span class="annottext">[FFIType]
</span><a href="#local-6989586621679097069"><span class="hs-identifier hs-var">args</span></a></span></span><span> </span><span id="local-6989586621679097068"><span class="annot"><span class="annottext">FFIType
</span><a href="#local-6989586621679097068"><span class="hs-identifier hs-var">res</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Ptr C_ffi_cif -&gt; RemotePtr C_ffi_cif
forall a. Ptr a -&gt; RemotePtr a
</span><a href="GHCi.RemoteTypes.html#toRemotePtr"><span class="hs-identifier hs-var">toRemotePtr</span></a></span><span> </span><span class="annot"><span class="annottext">(Ptr C_ffi_cif -&gt; RemotePtr C_ffi_cif)
-&gt; IO (Ptr C_ffi_cif) -&gt; IO (RemotePtr C_ffi_cif)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">FFIConv -&gt; [FFIType] -&gt; FFIType -&gt; IO (Ptr C_ffi_cif)
</span><a href="GHCi.FFI.html#prepForeignCall"><span class="hs-identifier hs-var">prepForeignCall</span></a></span><span> </span><span class="annot"><span class="annottext">FFIConv
</span><a href="#local-6989586621679097070"><span class="hs-identifier hs-var">conv</span></a></span><span> </span><span class="annot"><span class="annottext">[FFIType]
</span><a href="#local-6989586621679097069"><span class="hs-identifier hs-var">args</span></a></span><span> </span><span class="annot"><span class="annottext">FFIType
</span><a href="#local-6989586621679097068"><span class="hs-identifier hs-var">res</span></a></span><span>
</span><span id="line-91"></span><span>  </span><span class="annot"><a href="GHCi.Message.html#FreeFFI"><span class="hs-identifier hs-type">FreeFFI</span></a></span><span> </span><span id="local-6989586621679097064"><span class="annot"><span class="annottext">RemotePtr C_ffi_cif
</span><a href="#local-6989586621679097064"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Ptr C_ffi_cif -&gt; IO ()
</span><a href="GHCi.FFI.html#freeForeignCallInfo"><span class="hs-identifier hs-var">freeForeignCallInfo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RemotePtr C_ffi_cif -&gt; Ptr C_ffi_cif
forall a. RemotePtr a -&gt; Ptr a
</span><a href="GHCi.RemoteTypes.html#fromRemotePtr"><span class="hs-identifier hs-var">fromRemotePtr</span></a></span><span> </span><span class="annot"><span class="annottext">RemotePtr C_ffi_cif
</span><a href="#local-6989586621679097064"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-92"></span><span>  </span><span class="annot"><a href="GHCi.Message.html#MkConInfoTable"><span class="hs-identifier hs-type">MkConInfoTable</span></a></span><span> </span><span id="local-6989586621679097059"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679097059"><span class="hs-identifier hs-var">tc</span></a></span></span><span> </span><span id="local-6989586621679097058"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679097058"><span class="hs-identifier hs-var">ptrs</span></a></span></span><span> </span><span id="local-6989586621679097057"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679097057"><span class="hs-identifier hs-var">nptrs</span></a></span></span><span> </span><span id="local-6989586621679097056"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679097056"><span class="hs-identifier hs-var">tag</span></a></span></span><span> </span><span id="local-6989586621679097055"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679097055"><span class="hs-identifier hs-var">ptrtag</span></a></span></span><span> </span><span id="local-6989586621679097054"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679097054"><span class="hs-identifier hs-var">desc</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-93"></span><span>    </span><span class="annot"><span class="annottext">Ptr StgInfoTable -&gt; RemotePtr StgInfoTable
forall a. Ptr a -&gt; RemotePtr a
</span><a href="GHCi.RemoteTypes.html#toRemotePtr"><span class="hs-identifier hs-var">toRemotePtr</span></a></span><span> </span><span class="annot"><span class="annottext">(Ptr StgInfoTable -&gt; RemotePtr StgInfoTable)
-&gt; IO (Ptr StgInfoTable) -&gt; IO (RemotePtr StgInfoTable)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
-&gt; Int -&gt; Int -&gt; Int -&gt; Int -&gt; ByteString -&gt; IO (Ptr StgInfoTable)
</span><a href="GHCi.InfoTable.html#mkConInfoTable"><span class="hs-identifier hs-var">mkConInfoTable</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679097059"><span class="hs-identifier hs-var">tc</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679097058"><span class="hs-identifier hs-var">ptrs</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679097057"><span class="hs-identifier hs-var">nptrs</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679097056"><span class="hs-identifier hs-var">tag</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679097055"><span class="hs-identifier hs-var">ptrtag</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679097054"><span class="hs-identifier hs-var">desc</span></a></span><span>
</span><span id="line-94"></span><span>  </span><span class="annot"><span class="annottext">Message a
</span><a href="GHCi.Message.html#StartTH"><span class="hs-identifier hs-var">StartTH</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">IO a
IO (RemoteRef (IORef QState))
</span><a href="GHCi.TH.html#startTH"><span class="hs-identifier hs-var">startTH</span></a></span><span>
</span><span id="line-95"></span><span>  </span><span class="annot"><a href="GHCi.Message.html#GetClosure"><span class="hs-identifier hs-type">GetClosure</span></a></span><span> </span><span id="local-6989586621679097040"><span class="annot"><span class="annottext">HValueRef
</span><a href="#local-6989586621679097040"><span class="hs-identifier hs-var">ref</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-96"></span><span>    </span><span id="local-6989586621679097039"><span class="annot"><span class="annottext">Closure
</span><a href="#local-6989586621679097039"><span class="hs-identifier hs-var">clos</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">HValue -&gt; IO Closure
forall a. HasHeapRep a =&gt; a -&gt; IO Closure
</span><a href="../../ghc-heap/src/GHC.Exts.Heap.html#getClosureData"><span class="hs-identifier hs-var">getClosureData</span></a></span><span> </span><span class="annot"><span class="annottext">(HValue -&gt; IO Closure) -&gt; IO HValue -&gt; IO Closure
forall (m :: * -&gt; *) a b. Monad m =&gt; (a -&gt; m b) -&gt; m a -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3D%3C%3C"><span class="hs-operator hs-var">=&lt;&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">HValueRef -&gt; IO HValue
forall a. RemoteRef a -&gt; IO a
</span><a href="GHCi.RemoteTypes.html#localRef"><span class="hs-identifier hs-var">localRef</span></a></span><span> </span><span class="annot"><span class="annottext">HValueRef
</span><a href="#local-6989586621679097040"><span class="hs-identifier hs-var">ref</span></a></span><span>
</span><span id="line-97"></span><span>    </span><span class="annot"><span class="annottext">(Box -&gt; IO HValueRef) -&gt; Closure -&gt; IO (GenClosure HValueRef)
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Traversable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m (t b)
</span><a href="../../base/src/Data.Traversable.html#mapM"><span class="hs-identifier hs-var">mapM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-heap/src/GHC.Exts.Heap.Closures.html#Box"><span class="hs-identifier hs-type">Box</span></a></span><span> </span><span id="local-6989586621679097036"><span class="annot"><span class="annottext">Any
</span><a href="#local-6989586621679097036"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">HValue -&gt; IO HValueRef
forall a. a -&gt; IO (RemoteRef a)
</span><a href="GHCi.RemoteTypes.html#mkRemoteRef"><span class="hs-identifier hs-var">mkRemoteRef</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Any -&gt; HValue
</span><a href="GHCi.RemoteTypes.html#HValue"><span class="hs-identifier hs-var">HValue</span></a></span><span> </span><span class="annot"><span class="annottext">Any
</span><a href="#local-6989586621679097036"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Closure
</span><a href="#local-6989586621679097039"><span class="hs-identifier hs-var">clos</span></a></span><span>
</span><span id="line-98"></span><span>  </span><span class="annot"><a href="GHCi.Message.html#Seq"><span class="hs-identifier hs-type">Seq</span></a></span><span> </span><span id="local-6989586621679097032"><span class="annot"><span class="annottext">HValueRef
</span><a href="#local-6989586621679097032"><span class="hs-identifier hs-var">ref</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">HValueRef -&gt; IO (EvalStatus_ () ())
forall a. RemoteRef a -&gt; IO (EvalStatus_ () ())
</span><a href="GHCi.Run.html#doSeq"><span class="hs-identifier hs-var">doSeq</span></a></span><span> </span><span class="annot"><span class="annottext">HValueRef
</span><a href="#local-6989586621679097032"><span class="hs-identifier hs-var">ref</span></a></span><span>
</span><span id="line-99"></span><span>  </span><span class="annot"><a href="GHCi.Message.html#ResumeSeq"><span class="hs-identifier hs-type">ResumeSeq</span></a></span><span> </span><span id="local-6989586621679097028"><span class="annot"><span class="annottext">RemoteRef (ResumeContext ())
</span><a href="#local-6989586621679097028"><span class="hs-identifier hs-var">ref</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">RemoteRef (ResumeContext ()) -&gt; IO (EvalStatus_ () ())
</span><a href="GHCi.Run.html#resumeSeq"><span class="hs-identifier hs-var">resumeSeq</span></a></span><span> </span><span class="annot"><span class="annottext">RemoteRef (ResumeContext ())
</span><a href="#local-6989586621679097028"><span class="hs-identifier hs-var">ref</span></a></span><span>
</span><span id="line-100"></span><span>  </span><span id="local-6989586621679097026"><span class="annot"><span class="annottext">Message a
</span><a href="#local-6989586621679097026"><span class="hs-identifier hs-var">_other</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; IO a
forall a. HasCallStack =&gt; String -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;GHCi.Run.run&quot;</span></span><span>
</span><span id="line-101"></span><span>
</span><span id="line-102"></span><span class="annot"><a href="GHCi.Run.html#evalStmt"><span class="hs-identifier hs-type">evalStmt</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHCi.Message.html#EvalOpts"><span class="hs-identifier hs-type">EvalOpts</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHCi.Message.html#EvalExpr"><span class="hs-identifier hs-type">EvalExpr</span></a></span><span> </span><span class="annot"><a href="GHCi.RemoteTypes.html#HValueRef"><span class="hs-identifier hs-type">HValueRef</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHCi.Message.html#EvalStatus"><span class="hs-identifier hs-type">EvalStatus</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHCi.RemoteTypes.html#HValueRef"><span class="hs-identifier hs-type">HValueRef</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-103"></span><span id="evalStmt"><span class="annot"><span class="annottext">evalStmt :: EvalOpts
-&gt; EvalExpr HValueRef -&gt; IO (EvalStatus_ [HValueRef] [HValueRef])
</span><a href="GHCi.Run.html#evalStmt"><span class="hs-identifier hs-var hs-var">evalStmt</span></a></span></span><span> </span><span id="local-6989586621679097024"><span class="annot"><span class="annottext">EvalOpts
</span><a href="#local-6989586621679097024"><span class="hs-identifier hs-var">opts</span></a></span></span><span> </span><span id="local-6989586621679097023"><span class="annot"><span class="annottext">EvalExpr HValueRef
</span><a href="#local-6989586621679097023"><span class="hs-identifier hs-var">expr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-104"></span><span>  </span><span id="local-6989586621679097022"><span class="annot"><span class="annottext">HValue
</span><a href="#local-6989586621679097022"><span class="hs-identifier hs-var">io</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">EvalExpr HValueRef -&gt; IO HValue
</span><a href="#local-6989586621679097021"><span class="hs-identifier hs-var">mkIO</span></a></span><span> </span><span class="annot"><span class="annottext">EvalExpr HValueRef
</span><a href="#local-6989586621679097023"><span class="hs-identifier hs-var">expr</span></a></span><span>
</span><span id="line-105"></span><span>  </span><span class="annot"><span class="annottext">EvalOpts
-&gt; IO [HValueRef] -&gt; IO (EvalStatus_ [HValueRef] [HValueRef])
forall a. EvalOpts -&gt; IO a -&gt; IO (EvalStatus a)
</span><a href="GHCi.Run.html#sandboxIO"><span class="hs-identifier hs-var">sandboxIO</span></a></span><span> </span><span class="annot"><span class="annottext">EvalOpts
</span><a href="#local-6989586621679097024"><span class="hs-identifier hs-var">opts</span></a></span><span> </span><span class="annot"><span class="annottext">(IO [HValueRef] -&gt; IO (EvalStatus_ [HValueRef] [HValueRef]))
-&gt; IO [HValueRef] -&gt; IO (EvalStatus_ [HValueRef] [HValueRef])
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-106"></span><span>    </span><span id="local-6989586621679097019"><span class="annot"><span class="annottext">[HValue]
</span><a href="#local-6989586621679097019"><span class="hs-identifier hs-var">rs</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">HValue -&gt; IO [HValue]
forall a b. a -&gt; b
</span><a href="../../base/src/Unsafe.Coerce.html#unsafeCoerce"><span class="hs-identifier hs-var">unsafeCoerce</span></a></span><span> </span><span class="annot"><span class="annottext">HValue
</span><a href="#local-6989586621679097022"><span class="hs-identifier hs-var">io</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHCi.RemoteTypes.html#HValue"><span class="hs-identifier hs-type">HValue</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-107"></span><span>    </span><span class="annot"><span class="annottext">(HValue -&gt; IO HValueRef) -&gt; [HValue] -&gt; IO [HValueRef]
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Traversable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m (t b)
</span><a href="../../base/src/Data.Traversable.html#mapM"><span class="hs-identifier hs-var">mapM</span></a></span><span> </span><span class="annot"><span class="annottext">HValue -&gt; IO HValueRef
forall a. a -&gt; IO (RemoteRef a)
</span><a href="GHCi.RemoteTypes.html#mkRemoteRef"><span class="hs-identifier hs-var">mkRemoteRef</span></a></span><span> </span><span class="annot"><span class="annottext">[HValue]
</span><a href="#local-6989586621679097019"><span class="hs-identifier hs-var">rs</span></a></span><span>
</span><span id="line-108"></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-109"></span><span>  </span><span id="local-6989586621679097021"><span class="annot"><span class="annottext">mkIO :: EvalExpr HValueRef -&gt; IO HValue
</span><a href="#local-6989586621679097021"><span class="hs-identifier hs-var hs-var">mkIO</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHCi.Message.html#EvalThis"><span class="hs-identifier hs-type">EvalThis</span></a></span><span> </span><span id="local-6989586621679097013"><span class="annot"><span class="annottext">HValueRef
</span><a href="#local-6989586621679097013"><span class="hs-identifier hs-var">href</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HValueRef -&gt; IO HValue
forall a. RemoteRef a -&gt; IO a
</span><a href="GHCi.RemoteTypes.html#localRef"><span class="hs-identifier hs-var">localRef</span></a></span><span> </span><span class="annot"><span class="annottext">HValueRef
</span><a href="#local-6989586621679097013"><span class="hs-identifier hs-var">href</span></a></span><span>
</span><span id="line-110"></span><span>  </span><span class="annot"><a href="#local-6989586621679097021"><span class="hs-identifier hs-var">mkIO</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHCi.Message.html#EvalApp"><span class="hs-identifier hs-type">EvalApp</span></a></span><span> </span><span id="local-6989586621679097011"><span class="annot"><span class="annottext">EvalExpr HValueRef
</span><a href="#local-6989586621679097011"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span id="local-6989586621679097010"><span class="annot"><span class="annottext">EvalExpr HValueRef
</span><a href="#local-6989586621679097010"><span class="hs-identifier hs-var">r</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-111"></span><span>    </span><span id="local-6989586621679097009"><span class="annot"><span class="annottext">HValue
</span><a href="#local-6989586621679097009"><span class="hs-identifier hs-var">l'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">EvalExpr HValueRef -&gt; IO HValue
</span><a href="#local-6989586621679097021"><span class="hs-identifier hs-var">mkIO</span></a></span><span> </span><span class="annot"><span class="annottext">EvalExpr HValueRef
</span><a href="#local-6989586621679097011"><span class="hs-identifier hs-var">l</span></a></span><span>
</span><span id="line-112"></span><span>    </span><span id="local-6989586621679097008"><span class="annot"><span class="annottext">HValue
</span><a href="#local-6989586621679097008"><span class="hs-identifier hs-var">r'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">EvalExpr HValueRef -&gt; IO HValue
</span><a href="#local-6989586621679097021"><span class="hs-identifier hs-var">mkIO</span></a></span><span> </span><span class="annot"><span class="annottext">EvalExpr HValueRef
</span><a href="#local-6989586621679097010"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-113"></span><span>    </span><span class="annot"><span class="annottext">HValue -&gt; IO HValue
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">HValue -&gt; HValue -&gt; HValue
forall a b. a -&gt; b
</span><a href="../../base/src/Unsafe.Coerce.html#unsafeCoerce"><span class="hs-identifier hs-var">unsafeCoerce</span></a></span><span> </span><span class="annot"><span class="annottext">HValue
</span><a href="#local-6989586621679097009"><span class="hs-identifier hs-var">l'</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHCi.RemoteTypes.html#HValue"><span class="hs-identifier hs-type">HValue</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHCi.RemoteTypes.html#HValue"><span class="hs-identifier hs-type">HValue</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">HValue
</span><a href="#local-6989586621679097008"><span class="hs-identifier hs-var">r'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-114"></span><span>
</span><span id="line-115"></span><span class="annot"><a href="GHCi.Run.html#evalIO"><span class="hs-identifier hs-type">evalIO</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHCi.RemoteTypes.html#HValueRef"><span class="hs-identifier hs-type">HValueRef</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHCi.Message.html#EvalResult"><span class="hs-identifier hs-type">EvalResult</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-116"></span><span id="evalIO"><span class="annot"><span class="annottext">evalIO :: HValueRef -&gt; IO (EvalResult ())
</span><a href="GHCi.Run.html#evalIO"><span class="hs-identifier hs-var hs-var">evalIO</span></a></span></span><span> </span><span id="local-6989586621679097007"><span class="annot"><span class="annottext">HValueRef
</span><a href="#local-6989586621679097007"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-117"></span><span>  </span><span id="local-6989586621679097006"><span class="annot"><span class="annottext">HValue
</span><a href="#local-6989586621679097006"><span class="hs-identifier hs-var">io</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">HValueRef -&gt; IO HValue
forall a. RemoteRef a -&gt; IO a
</span><a href="GHCi.RemoteTypes.html#localRef"><span class="hs-identifier hs-var">localRef</span></a></span><span> </span><span class="annot"><span class="annottext">HValueRef
</span><a href="#local-6989586621679097007"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-118"></span><span>  </span><span class="annot"><span class="annottext">IO () -&gt; IO (EvalResult ())
forall a. IO a -&gt; IO (EvalResult a)
</span><a href="GHCi.Run.html#tryEval"><span class="hs-identifier hs-var">tryEval</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HValue -&gt; IO ()
forall a b. a -&gt; b
</span><a href="../../base/src/Unsafe.Coerce.html#unsafeCoerce"><span class="hs-identifier hs-var">unsafeCoerce</span></a></span><span> </span><span class="annot"><span class="annottext">HValue
</span><a href="#local-6989586621679097006"><span class="hs-identifier hs-var">io</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-119"></span><span>
</span><span id="line-120"></span><span class="annot"><a href="GHCi.Run.html#evalString"><span class="hs-identifier hs-type">evalString</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHCi.RemoteTypes.html#HValueRef"><span class="hs-identifier hs-type">HValueRef</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHCi.Message.html#EvalResult"><span class="hs-identifier hs-type">EvalResult</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-121"></span><span id="evalString"><span class="annot"><span class="annottext">evalString :: HValueRef -&gt; IO (EvalResult String)
</span><a href="GHCi.Run.html#evalString"><span class="hs-identifier hs-var hs-var">evalString</span></a></span></span><span> </span><span id="local-6989586621679097004"><span class="annot"><span class="annottext">HValueRef
</span><a href="#local-6989586621679097004"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-122"></span><span>  </span><span id="local-6989586621679097003"><span class="annot"><span class="annottext">HValue
</span><a href="#local-6989586621679097003"><span class="hs-identifier hs-var">io</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">HValueRef -&gt; IO HValue
forall a. RemoteRef a -&gt; IO a
</span><a href="GHCi.RemoteTypes.html#localRef"><span class="hs-identifier hs-var">localRef</span></a></span><span> </span><span class="annot"><span class="annottext">HValueRef
</span><a href="#local-6989586621679097004"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-123"></span><span>  </span><span class="annot"><span class="annottext">IO String -&gt; IO (EvalResult String)
forall a. IO a -&gt; IO (EvalResult a)
</span><a href="GHCi.Run.html#tryEval"><span class="hs-identifier hs-var">tryEval</span></a></span><span> </span><span class="annot"><span class="annottext">(IO String -&gt; IO (EvalResult String))
-&gt; IO String -&gt; IO (EvalResult String)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-124"></span><span>    </span><span id="local-6989586621679097002"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679097002"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">HValue -&gt; IO String
forall a b. a -&gt; b
</span><a href="../../base/src/Unsafe.Coerce.html#unsafeCoerce"><span class="hs-identifier hs-var">unsafeCoerce</span></a></span><span> </span><span class="annot"><span class="annottext">HValue
</span><a href="#local-6989586621679097003"><span class="hs-identifier hs-var">io</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-125"></span><span>    </span><span class="annot"><span class="annottext">String -&gt; IO String
forall a. a -&gt; IO a
</span><a href="../../base/src/GHC.IO.html#evaluate"><span class="hs-identifier hs-var">evaluate</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; String
forall a. NFData a =&gt; a -&gt; a
</span><a href="../../deepseq/src/Control.DeepSeq.html#force"><span class="hs-identifier hs-var">force</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679097002"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-126"></span><span>
</span><span id="line-127"></span><span class="annot"><a href="GHCi.Run.html#evalStringToString"><span class="hs-identifier hs-type">evalStringToString</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHCi.RemoteTypes.html#HValueRef"><span class="hs-identifier hs-type">HValueRef</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHCi.Message.html#EvalResult"><span class="hs-identifier hs-type">EvalResult</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-128"></span><span id="evalStringToString"><span class="annot"><span class="annottext">evalStringToString :: HValueRef -&gt; String -&gt; IO (EvalResult String)
</span><a href="GHCi.Run.html#evalStringToString"><span class="hs-identifier hs-var hs-var">evalStringToString</span></a></span></span><span> </span><span id="local-6989586621679096999"><span class="annot"><span class="annottext">HValueRef
</span><a href="#local-6989586621679096999"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span id="local-6989586621679096998"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679096998"><span class="hs-identifier hs-var">str</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-129"></span><span>  </span><span id="local-6989586621679096997"><span class="annot"><span class="annottext">HValue
</span><a href="#local-6989586621679096997"><span class="hs-identifier hs-var">io</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">HValueRef -&gt; IO HValue
forall a. RemoteRef a -&gt; IO a
</span><a href="GHCi.RemoteTypes.html#localRef"><span class="hs-identifier hs-var">localRef</span></a></span><span> </span><span class="annot"><span class="annottext">HValueRef
</span><a href="#local-6989586621679096999"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-130"></span><span>  </span><span class="annot"><span class="annottext">IO String -&gt; IO (EvalResult String)
forall a. IO a -&gt; IO (EvalResult a)
</span><a href="GHCi.Run.html#tryEval"><span class="hs-identifier hs-var">tryEval</span></a></span><span> </span><span class="annot"><span class="annottext">(IO String -&gt; IO (EvalResult String))
-&gt; IO String -&gt; IO (EvalResult String)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-131"></span><span>    </span><span id="local-6989586621679096996"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679096996"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HValue -&gt; String -&gt; IO String
forall a b. a -&gt; b
</span><a href="../../base/src/Unsafe.Coerce.html#unsafeCoerce"><span class="hs-identifier hs-var">unsafeCoerce</span></a></span><span> </span><span class="annot"><span class="annottext">HValue
</span><a href="#local-6989586621679096997"><span class="hs-identifier hs-var">io</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679096998"><span class="hs-identifier hs-var">str</span></a></span><span>
</span><span id="line-132"></span><span>    </span><span class="annot"><span class="annottext">String -&gt; IO String
forall a. a -&gt; IO a
</span><a href="../../base/src/GHC.IO.html#evaluate"><span class="hs-identifier hs-var">evaluate</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; String
forall a. NFData a =&gt; a -&gt; a
</span><a href="../../deepseq/src/Control.DeepSeq.html#force"><span class="hs-identifier hs-var">force</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679096996"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-133"></span><span>
</span><span id="line-134"></span><span class="hs-comment">-- | Process the Seq message to force a value.                       #2950</span><span>
</span><span id="line-135"></span><span class="hs-comment">-- If during this processing a breakpoint is hit, return</span><span>
</span><span id="line-136"></span><span class="hs-comment">-- an EvalBreak value in the EvalStatus to the UI process,</span><span>
</span><span id="line-137"></span><span class="hs-comment">-- otherwise return an EvalComplete.</span><span>
</span><span id="line-138"></span><span class="hs-comment">-- The UI process has more and therefore also can show more</span><span>
</span><span id="line-139"></span><span class="hs-comment">-- information about the breakpoint than the current iserv</span><span>
</span><span id="line-140"></span><span class="hs-comment">-- process.</span><span>
</span><span id="line-141"></span><span id="local-6989586621679097382"><span class="annot"><a href="GHCi.Run.html#doSeq"><span class="hs-identifier hs-type">doSeq</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHCi.RemoteTypes.html#RemoteRef"><span class="hs-identifier hs-type">RemoteRef</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097382"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHCi.Message.html#EvalStatus"><span class="hs-identifier hs-type">EvalStatus</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">)</span></span><span>
</span><span id="line-142"></span><span id="doSeq"><span class="annot"><span class="annottext">doSeq :: forall a. RemoteRef a -&gt; IO (EvalStatus_ () ())
</span><a href="GHCi.Run.html#doSeq"><span class="hs-identifier hs-var hs-var">doSeq</span></a></span></span><span> </span><span id="local-6989586621679096991"><span class="annot"><span class="annottext">RemoteRef a
</span><a href="#local-6989586621679096991"><span class="hs-identifier hs-var">ref</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-143"></span><span>    </span><span class="annot"><span class="annottext">EvalOpts -&gt; IO () -&gt; IO (EvalStatus_ () ())
forall a. EvalOpts -&gt; IO a -&gt; IO (EvalStatus a)
</span><a href="GHCi.Run.html#sandboxIO"><span class="hs-identifier hs-var">sandboxIO</span></a></span><span> </span><span class="annot"><span class="annottext">EvalOpts
</span><a href="GHCi.Run.html#evalOptsSeq"><span class="hs-identifier hs-var">evalOptsSeq</span></a></span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO (EvalStatus_ () ()))
-&gt; IO () -&gt; IO (EvalStatus_ () ())
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-144"></span><span>      </span><span class="annot"><span class="annottext">()
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IO a -&gt; IO ()
forall (f :: * -&gt; *) a. Functor f =&gt; f a -&gt; f ()
</span><a href="../../base/src/Data.Functor.html#void"><span class="hs-identifier hs-var">void</span></a></span><span> </span><span class="annot"><span class="annottext">(IO a -&gt; IO ()) -&gt; IO a -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; IO a
forall a. a -&gt; IO a
</span><a href="../../base/src/GHC.IO.html#evaluate"><span class="hs-identifier hs-var">evaluate</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; IO a) -&gt; IO a -&gt; IO a
forall (m :: * -&gt; *) a b. Monad m =&gt; (a -&gt; m b) -&gt; m a -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3D%3C%3C"><span class="hs-operator hs-var">=&lt;&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">RemoteRef a -&gt; IO a
forall a. RemoteRef a -&gt; IO a
</span><a href="GHCi.RemoteTypes.html#localRef"><span class="hs-identifier hs-var">localRef</span></a></span><span> </span><span class="annot"><span class="annottext">RemoteRef a
</span><a href="#local-6989586621679096991"><span class="hs-identifier hs-var">ref</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-145"></span><span>      </span><span class="annot"><span class="annottext">() -&gt; IO ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-146"></span><span>
</span><span id="line-147"></span><span class="hs-comment">-- | Process a ResumeSeq message. Continue the :force processing     #2950</span><span>
</span><span id="line-148"></span><span class="hs-comment">-- after a breakpoint.</span><span>
</span><span id="line-149"></span><span class="annot"><a href="GHCi.Run.html#resumeSeq"><span class="hs-identifier hs-type">resumeSeq</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHCi.RemoteTypes.html#RemoteRef"><span class="hs-identifier hs-type">RemoteRef</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHCi.Message.html#ResumeContext"><span class="hs-identifier hs-type">ResumeContext</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHCi.Message.html#EvalStatus"><span class="hs-identifier hs-type">EvalStatus</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-150"></span><span id="resumeSeq"><span class="annot"><span class="annottext">resumeSeq :: RemoteRef (ResumeContext ()) -&gt; IO (EvalStatus_ () ())
</span><a href="GHCi.Run.html#resumeSeq"><span class="hs-identifier hs-var hs-var">resumeSeq</span></a></span></span><span> </span><span id="local-6989586621679096988"><span class="annot"><span class="annottext">RemoteRef (ResumeContext ())
</span><a href="#local-6989586621679096988"><span class="hs-identifier hs-var">hvref</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-151"></span><span>    </span><span class="annot"><a href="GHCi.Message.html#ResumeContext"><span class="hs-identifier hs-type">ResumeContext</span></a></span><span class="hs-special">{</span><span id="local-6989586621679096984"><span id="local-6989586621679096985"><span id="local-6989586621679096986"><span class="annot"><span class="annottext">ThreadId
MVar ()
MVar (EvalStatus_ () ())
resumeThreadId :: forall a. ResumeContext a -&gt; ThreadId
resumeStatusMVar :: forall a. ResumeContext a -&gt; MVar (EvalStatus a)
resumeBreakMVar :: forall a. ResumeContext a -&gt; MVar ()
resumeThreadId :: ThreadId
resumeStatusMVar :: MVar (EvalStatus_ () ())
resumeBreakMVar :: MVar ()
</span><a href="GHCi.Message.html#resumeThreadId"><span class="hs-glyph hs-var hs-var hs-var hs-var hs-var hs-var">..</span></a></span></span></span></span><span class="hs-special">}</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RemoteRef (ResumeContext ()) -&gt; IO (ResumeContext ())
forall a. RemoteRef a -&gt; IO a
</span><a href="GHCi.RemoteTypes.html#localRef"><span class="hs-identifier hs-var">localRef</span></a></span><span> </span><span class="annot"><span class="annottext">RemoteRef (ResumeContext ())
</span><a href="#local-6989586621679096988"><span class="hs-identifier hs-var">hvref</span></a></span><span>
</span><span id="line-152"></span><span>    </span><span class="annot"><span class="annottext">EvalOpts
-&gt; MVar ()
-&gt; MVar (EvalStatus_ () ())
-&gt; IO (EvalStatus_ () ())
-&gt; IO (EvalStatus_ () ())
forall b a.
EvalOpts -&gt; MVar () -&gt; MVar (EvalStatus b) -&gt; IO a -&gt; IO a
</span><a href="GHCi.Run.html#withBreakAction"><span class="hs-identifier hs-var">withBreakAction</span></a></span><span> </span><span class="annot"><span class="annottext">EvalOpts
</span><a href="GHCi.Run.html#evalOptsSeq"><span class="hs-identifier hs-var">evalOptsSeq</span></a></span><span> </span><span class="annot"><span class="annottext">MVar ()
</span><a href="#local-6989586621679096986"><span class="hs-identifier hs-var">resumeBreakMVar</span></a></span><span> </span><span class="annot"><span class="annottext">MVar (EvalStatus_ () ())
</span><a href="#local-6989586621679096985"><span class="hs-identifier hs-var">resumeStatusMVar</span></a></span><span> </span><span class="annot"><span class="annottext">(IO (EvalStatus_ () ()) -&gt; IO (EvalStatus_ () ()))
-&gt; IO (EvalStatus_ () ()) -&gt; IO (EvalStatus_ () ())
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-153"></span><span>      </span><span class="annot"><span class="annottext">IO (EvalStatus_ () ()) -&gt; IO (EvalStatus_ () ())
forall a. IO a -&gt; IO a
</span><a href="../../base/src/GHC.IO.html#mask_"><span class="hs-identifier hs-var">mask_</span></a></span><span> </span><span class="annot"><span class="annottext">(IO (EvalStatus_ () ()) -&gt; IO (EvalStatus_ () ()))
-&gt; IO (EvalStatus_ () ()) -&gt; IO (EvalStatus_ () ())
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-154"></span><span>        </span><span class="annot"><span class="annottext">MVar () -&gt; () -&gt; IO ()
forall a. MVar a -&gt; a -&gt; IO ()
</span><a href="../../base/src/GHC.MVar.html#putMVar"><span class="hs-identifier hs-var">putMVar</span></a></span><span> </span><span class="annot"><span class="annottext">MVar ()
</span><a href="#local-6989586621679096986"><span class="hs-identifier hs-var">resumeBreakMVar</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span> </span><span class="hs-comment">-- this awakens the stopped thread...</span><span>
</span><span id="line-155"></span><span>        </span><span class="annot"><span class="annottext">ThreadId -&gt; IO (EvalStatus_ () ()) -&gt; IO (EvalStatus_ () ())
forall a. ThreadId -&gt; IO a -&gt; IO a
</span><a href="GHCi.Run.html#redirectInterrupts"><span class="hs-identifier hs-var">redirectInterrupts</span></a></span><span> </span><span class="annot"><span class="annottext">ThreadId
</span><a href="#local-6989586621679096984"><span class="hs-identifier hs-var">resumeThreadId</span></a></span><span> </span><span class="annot"><span class="annottext">(IO (EvalStatus_ () ()) -&gt; IO (EvalStatus_ () ()))
-&gt; IO (EvalStatus_ () ()) -&gt; IO (EvalStatus_ () ())
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">MVar (EvalStatus_ () ()) -&gt; IO (EvalStatus_ () ())
forall a. MVar a -&gt; IO a
</span><a href="../../base/src/GHC.MVar.html#takeMVar"><span class="hs-identifier hs-var">takeMVar</span></a></span><span> </span><span class="annot"><span class="annottext">MVar (EvalStatus_ () ())
</span><a href="#local-6989586621679096985"><span class="hs-identifier hs-var">resumeStatusMVar</span></a></span><span>
</span><span id="line-156"></span><span>
</span><span id="line-157"></span><span class="annot"><a href="GHCi.Run.html#evalOptsSeq"><span class="hs-identifier hs-type">evalOptsSeq</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHCi.Message.html#EvalOpts"><span class="hs-identifier hs-type">EvalOpts</span></a></span><span>
</span><span id="line-158"></span><span id="evalOptsSeq"><span class="annot"><span class="annottext">evalOptsSeq :: EvalOpts
</span><a href="GHCi.Run.html#evalOptsSeq"><span class="hs-identifier hs-var hs-var">evalOptsSeq</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">EvalOpts :: Bool -&gt; Bool -&gt; Bool -&gt; Bool -&gt; EvalOpts
</span><a href="GHCi.Message.html#EvalOpts"><span class="hs-identifier hs-type">EvalOpts</span></a></span><span>
</span><span id="line-159"></span><span>              </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">useSandboxThread :: Bool
</span><a href="GHCi.Message.html#useSandboxThread"><span class="hs-identifier hs-var">useSandboxThread</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-160"></span><span>              </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">singleStep :: Bool
</span><a href="GHCi.Message.html#singleStep"><span class="hs-identifier hs-var">singleStep</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-161"></span><span>              </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">breakOnException :: Bool
</span><a href="GHCi.Message.html#breakOnException"><span class="hs-identifier hs-var">breakOnException</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-162"></span><span>              </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">breakOnError :: Bool
</span><a href="GHCi.Message.html#breakOnError"><span class="hs-identifier hs-var">breakOnError</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-163"></span><span>              </span><span class="hs-special">}</span><span>
</span><span id="line-164"></span><span>
</span><span id="line-165"></span><span class="hs-comment">-- When running a computation, we redirect ^C exceptions to the running</span><span>
</span><span id="line-166"></span><span class="hs-comment">-- thread.  ToDo: we might want a way to continue even if the target</span><span>
</span><span id="line-167"></span><span class="hs-comment">-- thread doesn't die when it receives the exception... &quot;this thread</span><span>
</span><span id="line-168"></span><span class="hs-comment">-- is not responding&quot;.</span><span>
</span><span id="line-169"></span><span class="hs-comment">--</span><span>
</span><span id="line-170"></span><span class="hs-comment">-- Careful here: there may be ^C exceptions flying around, so we start the new</span><span>
</span><span id="line-171"></span><span class="hs-comment">-- thread blocked (forkIO inherits mask from the parent, #1048), and unblock</span><span>
</span><span id="line-172"></span><span class="hs-comment">-- only while we execute the user's code.  We can't afford to lose the final</span><span>
</span><span id="line-173"></span><span class="hs-comment">-- putMVar, otherwise deadlock ensues. (#1583, #1922, #1946)</span><span>
</span><span id="line-174"></span><span>
</span><span id="line-175"></span><span id="local-6989586621679097379"><span class="annot"><a href="GHCi.Run.html#sandboxIO"><span class="hs-identifier hs-type">sandboxIO</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHCi.Message.html#EvalOpts"><span class="hs-identifier hs-type">EvalOpts</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="#local-6989586621679097379"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHCi.Message.html#EvalStatus"><span class="hs-identifier hs-type">EvalStatus</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097379"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-176"></span><span id="sandboxIO"><span class="annot"><span class="annottext">sandboxIO :: forall a. EvalOpts -&gt; IO a -&gt; IO (EvalStatus a)
</span><a href="GHCi.Run.html#sandboxIO"><span class="hs-identifier hs-var hs-var">sandboxIO</span></a></span></span><span> </span><span id="local-6989586621679096967"><span class="annot"><span class="annottext">EvalOpts
</span><a href="#local-6989586621679096967"><span class="hs-identifier hs-var">opts</span></a></span></span><span> </span><span id="local-6989586621679096966"><span class="annot"><span class="annottext">IO a
</span><a href="#local-6989586621679096966"><span class="hs-identifier hs-var">io</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-177"></span><span>  </span><span class="hs-comment">-- We are running in uninterruptibleMask</span><span>
</span><span id="line-178"></span><span>  </span><span id="local-6989586621679096965"><span class="annot"><span class="annottext">MVar ()
</span><a href="#local-6989586621679096965"><span class="hs-identifier hs-var">breakMVar</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IO (MVar ())
forall a. IO (MVar a)
</span><a href="../../base/src/GHC.MVar.html#newEmptyMVar"><span class="hs-identifier hs-var">newEmptyMVar</span></a></span><span>
</span><span id="line-179"></span><span>  </span><span id="local-6989586621679096963"><span class="annot"><span class="annottext">MVar (EvalStatus a)
</span><a href="#local-6989586621679096963"><span class="hs-identifier hs-var">statusMVar</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IO (MVar (EvalStatus a))
forall a. IO (MVar a)
</span><a href="../../base/src/GHC.MVar.html#newEmptyMVar"><span class="hs-identifier hs-var">newEmptyMVar</span></a></span><span>
</span><span id="line-180"></span><span>  </span><span class="annot"><span class="annottext">EvalOpts
-&gt; MVar ()
-&gt; MVar (EvalStatus a)
-&gt; IO (EvalStatus a)
-&gt; IO (EvalStatus a)
forall b a.
EvalOpts -&gt; MVar () -&gt; MVar (EvalStatus b) -&gt; IO a -&gt; IO a
</span><a href="GHCi.Run.html#withBreakAction"><span class="hs-identifier hs-var">withBreakAction</span></a></span><span> </span><span class="annot"><span class="annottext">EvalOpts
</span><a href="#local-6989586621679096967"><span class="hs-identifier hs-var">opts</span></a></span><span> </span><span class="annot"><span class="annottext">MVar ()
</span><a href="#local-6989586621679096965"><span class="hs-identifier hs-var">breakMVar</span></a></span><span> </span><span class="annot"><span class="annottext">MVar (EvalStatus a)
</span><a href="#local-6989586621679096963"><span class="hs-identifier hs-var">statusMVar</span></a></span><span> </span><span class="annot"><span class="annottext">(IO (EvalStatus a) -&gt; IO (EvalStatus a))
-&gt; IO (EvalStatus a) -&gt; IO (EvalStatus a)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-181"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679096962"><span class="annot"><span class="annottext">runIt :: IO (EvalStatus a)
</span><a href="#local-6989586621679096962"><span class="hs-identifier hs-var hs-var">runIt</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IO (EvalResult a) -&gt; IO (EvalStatus a)
forall a. IO (EvalResult a) -&gt; IO (EvalStatus a)
</span><a href="GHCi.Run.html#measureAlloc"><span class="hs-identifier hs-var">measureAlloc</span></a></span><span> </span><span class="annot"><span class="annottext">(IO (EvalResult a) -&gt; IO (EvalStatus a))
-&gt; IO (EvalResult a) -&gt; IO (EvalStatus a)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">IO a -&gt; IO (EvalResult a)
forall a. IO a -&gt; IO (EvalResult a)
</span><a href="GHCi.Run.html#tryEval"><span class="hs-identifier hs-var">tryEval</span></a></span><span> </span><span class="annot"><span class="annottext">(IO a -&gt; IO (EvalResult a)) -&gt; IO a -&gt; IO (EvalResult a)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">EvalOpts -&gt; IO a -&gt; IO a
forall a. EvalOpts -&gt; IO a -&gt; IO a
</span><a href="GHCi.Run.html#rethrow"><span class="hs-identifier hs-var">rethrow</span></a></span><span> </span><span class="annot"><span class="annottext">EvalOpts
</span><a href="#local-6989586621679096967"><span class="hs-identifier hs-var">opts</span></a></span><span> </span><span class="annot"><span class="annottext">(IO a -&gt; IO a) -&gt; IO a -&gt; IO a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">IO a -&gt; IO a
forall a. IO a -&gt; IO a
</span><a href="../../base/src/GHC.Stack.CCS.html#clearCCS"><span class="hs-identifier hs-var">clearCCS</span></a></span><span> </span><span class="annot"><span class="annottext">IO a
</span><a href="#local-6989586621679096966"><span class="hs-identifier hs-var">io</span></a></span><span>
</span><span id="line-182"></span><span>    </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">EvalOpts -&gt; Bool
</span><a href="GHCi.Message.html#useSandboxThread"><span class="hs-identifier hs-var hs-var">useSandboxThread</span></a></span><span> </span><span class="annot"><span class="annottext">EvalOpts
</span><a href="#local-6989586621679096967"><span class="hs-identifier hs-var">opts</span></a></span><span>
</span><span id="line-183"></span><span>       </span><span class="hs-keyword">then</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-184"></span><span>         </span><span id="local-6989586621679096958"><span class="annot"><span class="annottext">ThreadId
</span><a href="#local-6989586621679096958"><span class="hs-identifier hs-var">tid</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IO () -&gt; IO ThreadId
</span><a href="../../base/src/GHC.Conc.Sync.html#forkIO"><span class="hs-identifier hs-var">forkIO</span></a></span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ThreadId) -&gt; IO () -&gt; IO ThreadId
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span> </span><span class="annot"><span class="annottext">IO (EvalStatus a) -&gt; IO (EvalStatus a)
forall a. IO a -&gt; IO a
</span><a href="../../base/src/GHC.IO.html#unsafeUnmask"><span class="hs-identifier hs-var">unsafeUnmask</span></a></span><span> </span><span class="annot"><span class="annottext">IO (EvalStatus a)
</span><a href="#local-6989586621679096962"><span class="hs-identifier hs-var">runIt</span></a></span><span> </span><span class="annot"><span class="annottext">IO (EvalStatus a) -&gt; (EvalStatus a -&gt; IO ()) -&gt; IO ()
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; (a -&gt; m b) -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var">&gt;&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">MVar (EvalStatus a) -&gt; EvalStatus a -&gt; IO ()
forall a. MVar a -&gt; a -&gt; IO ()
</span><a href="../../base/src/GHC.MVar.html#putMVar"><span class="hs-identifier hs-var">putMVar</span></a></span><span> </span><span class="annot"><span class="annottext">MVar (EvalStatus a)
</span><a href="#local-6989586621679096963"><span class="hs-identifier hs-var">statusMVar</span></a></span><span>
</span><span id="line-185"></span><span>                                </span><span class="hs-comment">-- empty: can't block</span><span>
</span><span id="line-186"></span><span>         </span><span class="annot"><span class="annottext">ThreadId -&gt; IO (EvalStatus a) -&gt; IO (EvalStatus a)
forall a. ThreadId -&gt; IO a -&gt; IO a
</span><a href="GHCi.Run.html#redirectInterrupts"><span class="hs-identifier hs-var">redirectInterrupts</span></a></span><span> </span><span class="annot"><span class="annottext">ThreadId
</span><a href="#local-6989586621679096958"><span class="hs-identifier hs-var">tid</span></a></span><span> </span><span class="annot"><span class="annottext">(IO (EvalStatus a) -&gt; IO (EvalStatus a))
-&gt; IO (EvalStatus a) -&gt; IO (EvalStatus a)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">IO (EvalStatus a) -&gt; IO (EvalStatus a)
forall a. IO a -&gt; IO a
</span><a href="../../base/src/GHC.IO.html#unsafeUnmask"><span class="hs-identifier hs-var">unsafeUnmask</span></a></span><span> </span><span class="annot"><span class="annottext">(IO (EvalStatus a) -&gt; IO (EvalStatus a))
-&gt; IO (EvalStatus a) -&gt; IO (EvalStatus a)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">MVar (EvalStatus a) -&gt; IO (EvalStatus a)
forall a. MVar a -&gt; IO a
</span><a href="../../base/src/GHC.MVar.html#takeMVar"><span class="hs-identifier hs-var">takeMVar</span></a></span><span> </span><span class="annot"><span class="annottext">MVar (EvalStatus a)
</span><a href="#local-6989586621679096963"><span class="hs-identifier hs-var">statusMVar</span></a></span><span>
</span><span id="line-187"></span><span>       </span><span class="hs-keyword">else</span><span>
</span><span id="line-188"></span><span>          </span><span class="hs-comment">-- GLUT on OS X needs to run on the main thread. If you</span><span>
</span><span id="line-189"></span><span>          </span><span class="hs-comment">-- try to use it from another thread then you just get a</span><span>
</span><span id="line-190"></span><span>          </span><span class="hs-comment">-- white rectangle rendered. For this, or anything else</span><span>
</span><span id="line-191"></span><span>          </span><span class="hs-comment">-- with such restrictions, you can turn the GHCi sandbox off</span><span>
</span><span id="line-192"></span><span>          </span><span class="hs-comment">-- and things will be run in the main thread.</span><span>
</span><span id="line-193"></span><span>          </span><span class="hs-comment">--</span><span>
</span><span id="line-194"></span><span>          </span><span class="hs-comment">-- BUT, note that the debugging features (breakpoints,</span><span>
</span><span id="line-195"></span><span>          </span><span class="hs-comment">-- tracing, etc.) need the expression to be running in a</span><span>
</span><span id="line-196"></span><span>          </span><span class="hs-comment">-- separate thread, so debugging is only enabled when</span><span>
</span><span id="line-197"></span><span>          </span><span class="hs-comment">-- using the sandbox.</span><span>
</span><span id="line-198"></span><span>         </span><span class="annot"><span class="annottext">IO (EvalStatus a)
</span><a href="#local-6989586621679096962"><span class="hs-identifier hs-var">runIt</span></a></span><span>
</span><span id="line-199"></span><span>
</span><span id="line-200"></span><span class="hs-comment">-- We want to turn ^C into a break when -fbreak-on-exception is on,</span><span>
</span><span id="line-201"></span><span class="hs-comment">-- but it's an async exception and we only break for sync exceptions.</span><span>
</span><span id="line-202"></span><span class="hs-comment">-- Idea: if we catch and re-throw it, then the re-throw will trigger</span><span>
</span><span id="line-203"></span><span class="hs-comment">-- a break.  Great - but we don't want to re-throw all exceptions, because</span><span>
</span><span id="line-204"></span><span class="hs-comment">-- then we'll get a double break for ordinary sync exceptions (you'd have</span><span>
</span><span id="line-205"></span><span class="hs-comment">-- to :continue twice, which looks strange).  So if the exception is</span><span>
</span><span id="line-206"></span><span class="hs-comment">-- not &quot;Interrupted&quot;, we unset the exception flag before throwing.</span><span>
</span><span id="line-207"></span><span class="hs-comment">--</span><span>
</span><span id="line-208"></span><span id="local-6989586621679097354"><span class="annot"><a href="GHCi.Run.html#rethrow"><span class="hs-identifier hs-type">rethrow</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHCi.Message.html#EvalOpts"><span class="hs-identifier hs-type">EvalOpts</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="#local-6989586621679097354"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="#local-6989586621679097354"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-209"></span><span id="rethrow"><span class="annot"><span class="annottext">rethrow :: forall a. EvalOpts -&gt; IO a -&gt; IO a
</span><a href="GHCi.Run.html#rethrow"><span class="hs-identifier hs-var hs-var">rethrow</span></a></span></span><span> </span><span class="annot"><a href="GHCi.Message.html#EvalOpts"><span class="hs-identifier hs-type">EvalOpts</span></a></span><span class="hs-special">{</span><span id="local-6989586621679096941"><span id="local-6989586621679096942"><span id="local-6989586621679096943"><span id="local-6989586621679096944"><span class="annot"><span class="annottext">Bool
breakOnError :: Bool
breakOnException :: Bool
singleStep :: Bool
useSandboxThread :: Bool
breakOnError :: EvalOpts -&gt; Bool
breakOnException :: EvalOpts -&gt; Bool
singleStep :: EvalOpts -&gt; Bool
useSandboxThread :: EvalOpts -&gt; Bool
</span><a href="#local-6989586621679096941"><span class="hs-glyph hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">..</span></a></span></span></span></span></span><span class="hs-special">}</span><span> </span><span id="local-6989586621679096940"><span class="annot"><span class="annottext">IO a
</span><a href="#local-6989586621679096940"><span class="hs-identifier hs-var">io</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-210"></span><span>  </span><span class="annot"><span class="annottext">IO a -&gt; (SomeException -&gt; IO a) -&gt; IO a
forall e a. Exception e =&gt; IO a -&gt; (e -&gt; IO a) -&gt; IO a
</span><a href="../../base/src/GHC.IO.html#catch"><span class="hs-identifier hs-var">catch</span></a></span><span> </span><span class="annot"><span class="annottext">IO a
</span><a href="#local-6989586621679096940"><span class="hs-identifier hs-var">io</span></a></span><span> </span><span class="annot"><span class="annottext">((SomeException -&gt; IO a) -&gt; IO a)
-&gt; (SomeException -&gt; IO a) -&gt; IO a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679096938"><span class="annot"><span class="annottext">SomeException
</span><a href="#local-6989586621679096938"><span class="hs-identifier hs-var">se</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-211"></span><span>    </span><span class="hs-comment">-- If -fbreak-on-error, we break unconditionally,</span><span>
</span><span id="line-212"></span><span>    </span><span class="hs-comment">--  but with care of not breaking twice</span><span>
</span><span id="line-213"></span><span>    </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679096941"><span class="hs-identifier hs-var">breakOnError</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679096942"><span class="hs-identifier hs-var">breakOnException</span></a></span><span>
</span><span id="line-214"></span><span>       </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Ptr CInt -&gt; CInt -&gt; IO ()
forall a. Storable a =&gt; Ptr a -&gt; a -&gt; IO ()
</span><a href="../../base/src/Foreign.Storable.html#poke"><span class="hs-identifier hs-var">poke</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr CInt
</span><a href="GHCi.Run.html#exceptionFlag"><span class="hs-identifier hs-var">exceptionFlag</span></a></span><span> </span><span class="annot"><span class="annottext">CInt
</span><span class="hs-number">1</span></span><span>
</span><span id="line-215"></span><span>       </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">SomeException -&gt; Maybe AsyncException
forall e. Exception e =&gt; SomeException -&gt; Maybe e
</span><a href="../../base/src/GHC.Exception.Type.html#fromException"><span class="hs-identifier hs-var">fromException</span></a></span><span> </span><span class="annot"><span class="annottext">SomeException
</span><a href="#local-6989586621679096938"><span class="hs-identifier hs-var">se</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-216"></span><span>               </span><span class="hs-comment">-- If it is a &quot;UserInterrupt&quot; exception, we allow</span><span>
</span><span id="line-217"></span><span>               </span><span class="hs-comment">--  a possible break by way of -fbreak-on-exception</span><span>
</span><span id="line-218"></span><span>               </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="annot"><span class="annottext">AsyncException
</span><a href="../../base/src/GHC.IO.Exception.html#UserInterrupt"><span class="hs-identifier hs-var">UserInterrupt</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">() -&gt; IO ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-219"></span><span>               </span><span class="hs-comment">-- In any other case, we don't want to break</span><span>
</span><span id="line-220"></span><span>               </span><span class="annot"><span class="annottext">Maybe AsyncException
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Ptr CInt -&gt; CInt -&gt; IO ()
forall a. Storable a =&gt; Ptr a -&gt; a -&gt; IO ()
</span><a href="../../base/src/Foreign.Storable.html#poke"><span class="hs-identifier hs-var">poke</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr CInt
</span><a href="GHCi.Run.html#exceptionFlag"><span class="hs-identifier hs-var">exceptionFlag</span></a></span><span> </span><span class="annot"><span class="annottext">CInt
</span><span class="hs-number">0</span></span><span>
</span><span id="line-221"></span><span>    </span><span class="annot"><span class="annottext">SomeException -&gt; IO a
forall e a. Exception e =&gt; e -&gt; IO a
</span><a href="../../base/src/GHC.IO.html#throwIO"><span class="hs-identifier hs-var">throwIO</span></a></span><span> </span><span class="annot"><span class="annottext">SomeException
</span><a href="#local-6989586621679096938"><span class="hs-identifier hs-var">se</span></a></span><span>
</span><span id="line-222"></span><span>
</span><span id="line-223"></span><span class="hs-comment">--</span><span>
</span><span id="line-224"></span><span class="hs-comment">-- While we're waiting for the sandbox thread to return a result, if</span><span>
</span><span id="line-225"></span><span class="hs-comment">-- the current thread receives an asynchronous exception we re-throw</span><span>
</span><span id="line-226"></span><span class="hs-comment">-- it at the sandbox thread and continue to wait.</span><span>
</span><span id="line-227"></span><span class="hs-comment">--</span><span>
</span><span id="line-228"></span><span class="hs-comment">-- This is for two reasons:</span><span>
</span><span id="line-229"></span><span class="hs-comment">--</span><span>
</span><span id="line-230"></span><span class="hs-comment">--  * So that ^C interrupts runStmt (e.g. in GHCi), allowing the</span><span>
</span><span id="line-231"></span><span class="hs-comment">--    computation to run its exception handlers before returning the</span><span>
</span><span id="line-232"></span><span class="hs-comment">--    exception result to the caller of runStmt.</span><span>
</span><span id="line-233"></span><span class="hs-comment">--</span><span>
</span><span id="line-234"></span><span class="hs-comment">--  * clients of the GHC API can terminate a runStmt in progress</span><span>
</span><span id="line-235"></span><span class="hs-comment">--    without knowing the ThreadId of the sandbox thread (#1381)</span><span>
</span><span id="line-236"></span><span class="hs-comment">--</span><span>
</span><span id="line-237"></span><span class="hs-comment">-- NB. use a weak pointer to the thread, so that the thread can still</span><span>
</span><span id="line-238"></span><span class="hs-comment">-- be considered deadlocked by the RTS and sent a BlockedIndefinitely</span><span>
</span><span id="line-239"></span><span class="hs-comment">-- exception.  A symptom of getting this wrong is that conc033(ghci)</span><span>
</span><span id="line-240"></span><span class="hs-comment">-- will hang.</span><span>
</span><span id="line-241"></span><span class="hs-comment">--</span><span>
</span><span id="line-242"></span><span id="local-6989586621679097359"><span class="annot"><a href="GHCi.Run.html#redirectInterrupts"><span class="hs-identifier hs-type">redirectInterrupts</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Conc.Sync.html#ThreadId"><span class="hs-identifier hs-type">ThreadId</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="#local-6989586621679097359"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="#local-6989586621679097359"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-243"></span><span id="redirectInterrupts"><span class="annot"><span class="annottext">redirectInterrupts :: forall a. ThreadId -&gt; IO a -&gt; IO a
</span><a href="GHCi.Run.html#redirectInterrupts"><span class="hs-identifier hs-var hs-var">redirectInterrupts</span></a></span></span><span> </span><span id="local-6989586621679096925"><span class="annot"><span class="annottext">ThreadId
</span><a href="#local-6989586621679096925"><span class="hs-identifier hs-var">target</span></a></span></span><span> </span><span id="local-6989586621679096924"><span class="annot"><span class="annottext">IO a
</span><a href="#local-6989586621679096924"><span class="hs-identifier hs-var">wait</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-244"></span><span>  </span><span id="local-6989586621679096923"><span class="annot"><span class="annottext">Weak ThreadId
</span><a href="#local-6989586621679096923"><span class="hs-identifier hs-var">wtid</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ThreadId -&gt; IO (Weak ThreadId)
</span><a href="../../base/src/GHC.Conc.Sync.html#mkWeakThreadId"><span class="hs-identifier hs-var">mkWeakThreadId</span></a></span><span> </span><span class="annot"><span class="annottext">ThreadId
</span><a href="#local-6989586621679096925"><span class="hs-identifier hs-var">target</span></a></span><span>
</span><span id="line-245"></span><span>  </span><span class="annot"><span class="annottext">IO a
</span><a href="#local-6989586621679096924"><span class="hs-identifier hs-var">wait</span></a></span><span> </span><span class="annot"><span class="annottext">IO a -&gt; (SomeException -&gt; IO a) -&gt; IO a
forall e a. Exception e =&gt; IO a -&gt; (e -&gt; IO a) -&gt; IO a
</span><a href="../../base/src/GHC.IO.html#catch"><span class="hs-operator hs-var">`catch`</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679096921"><span class="annot"><span class="annottext">SomeException
</span><a href="#local-6989586621679096921"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-246"></span><span>     </span><span id="local-6989586621679096920"><span class="annot"><span class="annottext">Maybe ThreadId
</span><a href="#local-6989586621679096920"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Weak ThreadId -&gt; IO (Maybe ThreadId)
forall v. Weak v -&gt; IO (Maybe v)
</span><a href="../../base/src/GHC.Weak.html#deRefWeak"><span class="hs-identifier hs-var">deRefWeak</span></a></span><span> </span><span class="annot"><span class="annottext">Weak ThreadId
</span><a href="#local-6989586621679096923"><span class="hs-identifier hs-var">wtid</span></a></span><span>
</span><span id="line-247"></span><span>     </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Maybe ThreadId
</span><a href="#local-6989586621679096920"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-248"></span><span>       </span><span class="annot"><span class="annottext">Maybe ThreadId
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">IO a
</span><a href="#local-6989586621679096924"><span class="hs-identifier hs-var">wait</span></a></span><span>
</span><span id="line-249"></span><span>       </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679096919"><span class="annot"><span class="annottext">ThreadId
</span><a href="#local-6989586621679096919"><span class="hs-identifier hs-var">target</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="annot"><span class="annottext">ThreadId -&gt; SomeException -&gt; IO ()
forall e. Exception e =&gt; ThreadId -&gt; e -&gt; IO ()
</span><a href="../../base/src/GHC.Conc.Sync.html#throwTo"><span class="hs-identifier hs-var">throwTo</span></a></span><span> </span><span class="annot"><span class="annottext">ThreadId
</span><a href="#local-6989586621679096919"><span class="hs-identifier hs-var">target</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SomeException
</span><a href="#local-6989586621679096921"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Exception.Type.html#SomeException"><span class="hs-identifier hs-type">SomeException</span></a></span><span class="hs-special">)</span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">IO a
</span><a href="#local-6989586621679096924"><span class="hs-identifier hs-var">wait</span></a></span><span>
</span><span id="line-250"></span><span>
</span><span id="line-251"></span><span id="local-6989586621679097355"><span class="annot"><a href="GHCi.Run.html#measureAlloc"><span class="hs-identifier hs-type">measureAlloc</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHCi.Message.html#EvalResult"><span class="hs-identifier hs-type">EvalResult</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097355"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHCi.Message.html#EvalStatus"><span class="hs-identifier hs-type">EvalStatus</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097355"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-252"></span><span id="measureAlloc"><span class="annot"><span class="annottext">measureAlloc :: forall a. IO (EvalResult a) -&gt; IO (EvalStatus a)
</span><a href="GHCi.Run.html#measureAlloc"><span class="hs-identifier hs-var hs-var">measureAlloc</span></a></span></span><span> </span><span id="local-6989586621679096906"><span class="annot"><span class="annottext">IO (EvalResult a)
</span><a href="#local-6989586621679096906"><span class="hs-identifier hs-var">io</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-253"></span><span>  </span><span class="annot"><span class="annottext">Int64 -&gt; IO ()
</span><a href="../../base/src/GHC.Conc.Sync.html#setAllocationCounter"><span class="hs-identifier hs-var">setAllocationCounter</span></a></span><span> </span><span class="annot"><span class="annottext">Int64
</span><span class="hs-number">0</span></span><span>                                 </span><span class="hs-comment">-- #16012</span><span>
</span><span id="line-254"></span><span>  </span><span id="local-6989586621679096904"><span class="annot"><span class="annottext">EvalResult a
</span><a href="#local-6989586621679096904"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IO (EvalResult a)
</span><a href="#local-6989586621679096906"><span class="hs-identifier hs-var">io</span></a></span><span>
</span><span id="line-255"></span><span>  </span><span id="local-6989586621679096903"><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679096903"><span class="hs-identifier hs-var">ctr</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IO Int64
</span><a href="../../base/src/GHC.Conc.Sync.html#getAllocationCounter"><span class="hs-identifier hs-var">getAllocationCounter</span></a></span><span>
</span><span id="line-256"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679096901"><span class="annot"><span class="annottext">allocs :: Word64
</span><a href="#local-6989586621679096901"><span class="hs-identifier hs-var hs-var">allocs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word64 -&gt; Word64
forall a. Num a =&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#negate"><span class="hs-identifier hs-var">negate</span></a></span><span> </span><span class="annot"><span class="annottext">(Word64 -&gt; Word64) -&gt; Word64 -&gt; Word64
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Int64 -&gt; Word64
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679096903"><span class="hs-identifier hs-var">ctr</span></a></span><span>
</span><span id="line-257"></span><span>  </span><span class="annot"><span class="annottext">EvalStatus a -&gt; IO (EvalStatus a)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word64 -&gt; EvalResult a -&gt; EvalStatus a
forall a b. Word64 -&gt; EvalResult a -&gt; EvalStatus_ a b
</span><a href="GHCi.Message.html#EvalComplete"><span class="hs-identifier hs-var">EvalComplete</span></a></span><span> </span><span class="annot"><span class="annottext">Word64
</span><a href="#local-6989586621679096901"><span class="hs-identifier hs-var">allocs</span></a></span><span> </span><span class="annot"><span class="annottext">EvalResult a
</span><a href="#local-6989586621679096904"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-258"></span><span>
</span><span id="line-259"></span><span class="hs-comment">-- Exceptions can't be marshaled because they're dynamically typed, so</span><span>
</span><span id="line-260"></span><span class="hs-comment">-- everything becomes a String.</span><span>
</span><span id="line-261"></span><span id="local-6989586621679097372"><span class="annot"><a href="GHCi.Run.html#tryEval"><span class="hs-identifier hs-type">tryEval</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="#local-6989586621679097372"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHCi.Message.html#EvalResult"><span class="hs-identifier hs-type">EvalResult</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097372"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-262"></span><span id="tryEval"><span class="annot"><span class="annottext">tryEval :: forall a. IO a -&gt; IO (EvalResult a)
</span><a href="GHCi.Run.html#tryEval"><span class="hs-identifier hs-var hs-var">tryEval</span></a></span></span><span> </span><span id="local-6989586621679096895"><span class="annot"><span class="annottext">IO a
</span><a href="#local-6989586621679096895"><span class="hs-identifier hs-var">io</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-263"></span><span>  </span><span id="local-6989586621679096894"><span class="annot"><span class="annottext">Either SomeException a
</span><a href="#local-6989586621679096894"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IO a -&gt; IO (Either SomeException a)
forall e a. Exception e =&gt; IO a -&gt; IO (Either e a)
</span><a href="../../base/src/Control.Exception.Base.html#try"><span class="hs-identifier hs-var">try</span></a></span><span> </span><span class="annot"><span class="annottext">IO a
</span><a href="#local-6989586621679096895"><span class="hs-identifier hs-var">io</span></a></span><span>
</span><span id="line-264"></span><span>  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Either SomeException a
</span><a href="#local-6989586621679096894"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-265"></span><span>    </span><span class="annot"><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-type">Left</span></a></span><span> </span><span id="local-6989586621679096892"><span class="annot"><span class="annottext">SomeException
</span><a href="#local-6989586621679096892"><span class="hs-identifier hs-var">ex</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">EvalResult a -&gt; IO (EvalResult a)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SerializableException -&gt; EvalResult a
forall a. SerializableException -&gt; EvalResult a
</span><a href="GHCi.Message.html#EvalException"><span class="hs-identifier hs-var">EvalException</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SomeException -&gt; SerializableException
</span><a href="GHCi.Message.html#toSerializableException"><span class="hs-identifier hs-var">toSerializableException</span></a></span><span> </span><span class="annot"><span class="annottext">SomeException
</span><a href="#local-6989586621679096892"><span class="hs-identifier hs-var">ex</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-266"></span><span>    </span><span class="annot"><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-type">Right</span></a></span><span> </span><span id="local-6989586621679096889"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679096889"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">EvalResult a -&gt; IO (EvalResult a)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; EvalResult a
forall a. a -&gt; EvalResult a
</span><a href="GHCi.Message.html#EvalSuccess"><span class="hs-identifier hs-var">EvalSuccess</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679096889"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-267"></span><span>
</span><span id="line-268"></span><span class="hs-comment">-- This function sets up the interpreter for catching breakpoints, and</span><span>
</span><span id="line-269"></span><span class="hs-comment">-- resets everything when the computation has stopped running.  This</span><span>
</span><span id="line-270"></span><span class="hs-comment">-- is a not-very-good way to ensure that only the interactive</span><span>
</span><span id="line-271"></span><span class="hs-comment">-- evaluation should generate breakpoints.</span><span>
</span><span id="line-272"></span><span id="local-6989586621679097362"><span id="local-6989586621679097363"><span class="annot"><a href="GHCi.Run.html#withBreakAction"><span class="hs-identifier hs-type">withBreakAction</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHCi.Message.html#EvalOpts"><span class="hs-identifier hs-type">EvalOpts</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.MVar.html#MVar"><span class="hs-identifier hs-type">MVar</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.MVar.html#MVar"><span class="hs-identifier hs-type">MVar</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHCi.Message.html#EvalStatus"><span class="hs-identifier hs-type">EvalStatus</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097363"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="#local-6989586621679097362"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="#local-6989586621679097362"><span class="hs-identifier hs-type">a</span></a></span></span></span><span>
</span><span id="line-273"></span><span id="withBreakAction"><span class="annot"><span class="annottext">withBreakAction :: forall b a.
EvalOpts -&gt; MVar () -&gt; MVar (EvalStatus b) -&gt; IO a -&gt; IO a
</span><a href="GHCi.Run.html#withBreakAction"><span class="hs-identifier hs-var hs-var">withBreakAction</span></a></span></span><span> </span><span id="local-6989586621679096869"><span class="annot"><span class="annottext">EvalOpts
</span><a href="#local-6989586621679096869"><span class="hs-identifier hs-var">opts</span></a></span></span><span> </span><span id="local-6989586621679096868"><span class="annot"><span class="annottext">MVar ()
</span><a href="#local-6989586621679096868"><span class="hs-identifier hs-var">breakMVar</span></a></span></span><span> </span><span id="local-6989586621679096867"><span class="annot"><span class="annottext">MVar (EvalStatus b)
</span><a href="#local-6989586621679096867"><span class="hs-identifier hs-var">statusMVar</span></a></span></span><span> </span><span id="local-6989586621679096866"><span class="annot"><span class="annottext">IO a
</span><a href="#local-6989586621679096866"><span class="hs-identifier hs-var">act</span></a></span></span><span>
</span><span id="line-274"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IO (StablePtr BreakpointCallback)
-&gt; (StablePtr BreakpointCallback -&gt; IO ())
-&gt; (StablePtr BreakpointCallback -&gt; IO a)
-&gt; IO a
forall a b c. IO a -&gt; (a -&gt; IO b) -&gt; (a -&gt; IO c) -&gt; IO c
</span><a href="../../base/src/Control.Exception.Base.html#bracket"><span class="hs-identifier hs-var">bracket</span></a></span><span> </span><span class="annot"><span class="annottext">IO (StablePtr BreakpointCallback)
</span><a href="#local-6989586621679096864"><span class="hs-identifier hs-var">setBreakAction</span></a></span><span> </span><span class="annot"><span class="annottext">StablePtr BreakpointCallback -&gt; IO ()
forall {a}. StablePtr a -&gt; IO ()
</span><a href="#local-6989586621679096863"><span class="hs-identifier hs-var">resetBreakAction</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="annot"><span class="annottext">StablePtr BreakpointCallback
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">IO a
</span><a href="#local-6989586621679096866"><span class="hs-identifier hs-var">act</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-275"></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-276"></span><span>   </span><span id="local-6989586621679096864"><span class="annot"><span class="annottext">setBreakAction :: IO (StablePtr BreakpointCallback)
</span><a href="#local-6989586621679096864"><span class="hs-identifier hs-var hs-var">setBreakAction</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-277"></span><span>     </span><span id="local-6989586621679096862"><span class="annot"><span class="annottext">StablePtr BreakpointCallback
</span><a href="#local-6989586621679096862"><span class="hs-identifier hs-var">stablePtr</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">BreakpointCallback -&gt; IO (StablePtr BreakpointCallback)
forall a. a -&gt; IO (StablePtr a)
</span><a href="../../base/src/GHC.Stable.html#newStablePtr"><span class="hs-identifier hs-var">newStablePtr</span></a></span><span> </span><span class="annot"><span class="annottext">BreakpointCallback
</span><a href="#local-6989586621679096861"><span class="hs-identifier hs-var">onBreak</span></a></span><span>
</span><span id="line-278"></span><span>     </span><span class="annot"><span class="annottext">Ptr (StablePtr BreakpointCallback)
-&gt; StablePtr BreakpointCallback -&gt; IO ()
forall a. Storable a =&gt; Ptr a -&gt; a -&gt; IO ()
</span><a href="../../base/src/Foreign.Storable.html#poke"><span class="hs-identifier hs-var">poke</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr (StablePtr BreakpointCallback)
</span><a href="GHCi.Run.html#breakPointIOAction"><span class="hs-identifier hs-var">breakPointIOAction</span></a></span><span> </span><span class="annot"><span class="annottext">StablePtr BreakpointCallback
</span><a href="#local-6989586621679096862"><span class="hs-identifier hs-var">stablePtr</span></a></span><span>
</span><span id="line-279"></span><span>     </span><span class="annot"><span class="annottext">Bool -&gt; IO () -&gt; IO ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">EvalOpts -&gt; Bool
</span><a href="GHCi.Message.html#breakOnException"><span class="hs-identifier hs-var hs-var">breakOnException</span></a></span><span> </span><span class="annot"><span class="annottext">EvalOpts
</span><a href="#local-6989586621679096869"><span class="hs-identifier hs-var">opts</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr CInt -&gt; CInt -&gt; IO ()
forall a. Storable a =&gt; Ptr a -&gt; a -&gt; IO ()
</span><a href="../../base/src/Foreign.Storable.html#poke"><span class="hs-identifier hs-var">poke</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr CInt
</span><a href="GHCi.Run.html#exceptionFlag"><span class="hs-identifier hs-var">exceptionFlag</span></a></span><span> </span><span class="annot"><span class="annottext">CInt
</span><span class="hs-number">1</span></span><span>
</span><span id="line-280"></span><span>     </span><span class="annot"><span class="annottext">Bool -&gt; IO () -&gt; IO ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">EvalOpts -&gt; Bool
</span><a href="GHCi.Message.html#singleStep"><span class="hs-identifier hs-var hs-var">singleStep</span></a></span><span> </span><span class="annot"><span class="annottext">EvalOpts
</span><a href="#local-6989586621679096869"><span class="hs-identifier hs-var">opts</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">IO ()
</span><a href="GHCi.Run.html#setStepFlag"><span class="hs-identifier hs-var">setStepFlag</span></a></span><span>
</span><span id="line-281"></span><span>     </span><span class="annot"><span class="annottext">StablePtr BreakpointCallback -&gt; IO (StablePtr BreakpointCallback)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">StablePtr BreakpointCallback
</span><a href="#local-6989586621679096862"><span class="hs-identifier hs-var">stablePtr</span></a></span><span>
</span><span id="line-282"></span><span>        </span><span class="hs-comment">-- Breaking on exceptions is not enabled by default, since it</span><span>
</span><span id="line-283"></span><span>        </span><span class="hs-comment">-- might be a bit surprising.  The exception flag is turned off</span><span>
</span><span id="line-284"></span><span>        </span><span class="hs-comment">-- as soon as it is hit, or in resetBreakAction below.</span><span>
</span><span id="line-285"></span><span>
</span><span id="line-286"></span><span>   </span><span class="annot"><a href="#local-6989586621679096861"><span class="hs-identifier hs-type">onBreak</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHCi.Run.html#BreakpointCallback"><span class="hs-identifier hs-type">BreakpointCallback</span></a></span><span>
</span><span id="line-287"></span><span>   </span><span id="local-6989586621679096861"><span class="annot"><span class="annottext">onBreak :: BreakpointCallback
</span><a href="#local-6989586621679096861"><span class="hs-identifier hs-var hs-var">onBreak</span></a></span></span><span> </span><span id="local-6989586621679096857"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679096857"><span class="hs-identifier hs-var">ix#</span></a></span></span><span> </span><span id="local-6989586621679096856"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679096856"><span class="hs-identifier hs-var">uniq#</span></a></span></span><span> </span><span id="local-6989586621679096855"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679096855"><span class="hs-identifier hs-var">is_exception</span></a></span></span><span> </span><span id="local-6989586621679096854"><span class="annot"><span class="annottext">HValue
</span><a href="#local-6989586621679096854"><span class="hs-identifier hs-var">apStack</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-288"></span><span>     </span><span id="local-6989586621679096853"><span class="annot"><span class="annottext">ThreadId
</span><a href="#local-6989586621679096853"><span class="hs-identifier hs-var">tid</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IO ThreadId
</span><a href="../../base/src/GHC.Conc.Sync.html#myThreadId"><span class="hs-identifier hs-var">myThreadId</span></a></span><span>
</span><span id="line-289"></span><span>     </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679096851"><span class="annot"><span class="annottext">resume :: ResumeContext b
</span><a href="#local-6989586621679096851"><span class="hs-identifier hs-var hs-var">resume</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ResumeContext :: forall a.
MVar () -&gt; MVar (EvalStatus a) -&gt; ThreadId -&gt; ResumeContext a
</span><a href="GHCi.Message.html#ResumeContext"><span class="hs-identifier hs-type">ResumeContext</span></a></span><span>
</span><span id="line-290"></span><span>           </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">resumeBreakMVar :: MVar ()
</span><a href="GHCi.Message.html#resumeBreakMVar"><span class="hs-identifier hs-var">resumeBreakMVar</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MVar ()
</span><a href="#local-6989586621679096868"><span class="hs-identifier hs-var">breakMVar</span></a></span><span>
</span><span id="line-291"></span><span>           </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">resumeStatusMVar :: MVar (EvalStatus b)
</span><a href="GHCi.Message.html#resumeStatusMVar"><span class="hs-identifier hs-var">resumeStatusMVar</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MVar (EvalStatus b)
</span><a href="#local-6989586621679096867"><span class="hs-identifier hs-var">statusMVar</span></a></span><span>
</span><span id="line-292"></span><span>           </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">resumeThreadId :: ThreadId
</span><a href="GHCi.Message.html#resumeThreadId"><span class="hs-identifier hs-var">resumeThreadId</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ThreadId
</span><a href="#local-6989586621679096853"><span class="hs-identifier hs-var">tid</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-293"></span><span>     </span><span id="local-6989586621679096850"><span class="annot"><span class="annottext">RemoteRef (ResumeContext b)
</span><a href="#local-6989586621679096850"><span class="hs-identifier hs-var">resume_r</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ResumeContext b -&gt; IO (RemoteRef (ResumeContext b))
forall a. a -&gt; IO (RemoteRef a)
</span><a href="GHCi.RemoteTypes.html#mkRemoteRef"><span class="hs-identifier hs-var">mkRemoteRef</span></a></span><span> </span><span class="annot"><span class="annottext">ResumeContext b
</span><a href="#local-6989586621679096851"><span class="hs-identifier hs-var">resume</span></a></span><span>
</span><span id="line-294"></span><span>     </span><span id="local-6989586621679096849"><span class="annot"><span class="annottext">HValueRef
</span><a href="#local-6989586621679096849"><span class="hs-identifier hs-var">apStack_r</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">HValue -&gt; IO HValueRef
forall a. a -&gt; IO (RemoteRef a)
</span><a href="GHCi.RemoteTypes.html#mkRemoteRef"><span class="hs-identifier hs-var">mkRemoteRef</span></a></span><span> </span><span class="annot"><span class="annottext">HValue
</span><a href="#local-6989586621679096854"><span class="hs-identifier hs-var">apStack</span></a></span><span>
</span><span id="line-295"></span><span>     </span><span id="local-6989586621679096848"><span class="annot"><span class="annottext">RemotePtr CostCentreStack
</span><a href="#local-6989586621679096848"><span class="hs-identifier hs-var">ccs</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Ptr CostCentreStack -&gt; RemotePtr CostCentreStack
forall a. Ptr a -&gt; RemotePtr a
</span><a href="GHCi.RemoteTypes.html#toRemotePtr"><span class="hs-identifier hs-var">toRemotePtr</span></a></span><span> </span><span class="annot"><span class="annottext">(Ptr CostCentreStack -&gt; RemotePtr CostCentreStack)
-&gt; IO (Ptr CostCentreStack) -&gt; IO (RemotePtr CostCentreStack)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">HValue -&gt; IO (Ptr CostCentreStack)
forall a. a -&gt; IO (Ptr CostCentreStack)
</span><a href="../../base/src/GHC.Stack.CCS.html#getCCSOf"><span class="hs-identifier hs-var">getCCSOf</span></a></span><span> </span><span class="annot"><span class="annottext">HValue
</span><a href="#local-6989586621679096854"><span class="hs-identifier hs-var">apStack</span></a></span><span>
</span><span id="line-296"></span><span>     </span><span class="annot"><span class="annottext">MVar (EvalStatus b) -&gt; EvalStatus b -&gt; IO ()
forall a. MVar a -&gt; a -&gt; IO ()
</span><a href="../../base/src/GHC.MVar.html#putMVar"><span class="hs-identifier hs-var">putMVar</span></a></span><span> </span><span class="annot"><span class="annottext">MVar (EvalStatus b)
</span><a href="#local-6989586621679096867"><span class="hs-identifier hs-var">statusMVar</span></a></span><span> </span><span class="annot"><span class="annottext">(EvalStatus b -&gt; IO ()) -&gt; EvalStatus b -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
-&gt; HValueRef
-&gt; Int
-&gt; Int
-&gt; RemoteRef (ResumeContext b)
-&gt; RemotePtr CostCentreStack
-&gt; EvalStatus b
forall a b.
Bool
-&gt; HValueRef
-&gt; Int
-&gt; Int
-&gt; RemoteRef (ResumeContext b)
-&gt; RemotePtr CostCentreStack
-&gt; EvalStatus_ a b
</span><a href="GHCi.Message.html#EvalBreak"><span class="hs-identifier hs-var">EvalBreak</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679096855"><span class="hs-identifier hs-var">is_exception</span></a></span><span> </span><span class="annot"><span class="annottext">HValueRef
</span><a href="#local-6989586621679096849"><span class="hs-identifier hs-var">apStack_r</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int# -&gt; Int
</span><span class="hs-identifier hs-var">I#</span></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679096857"><span class="hs-identifier hs-var">ix#</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int# -&gt; Int
</span><span class="hs-identifier hs-var">I#</span></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679096856"><span class="hs-identifier hs-var">uniq#</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">RemoteRef (ResumeContext b)
</span><a href="#local-6989586621679096850"><span class="hs-identifier hs-var">resume_r</span></a></span><span> </span><span class="annot"><span class="annottext">RemotePtr CostCentreStack
</span><a href="#local-6989586621679096848"><span class="hs-identifier hs-var">ccs</span></a></span><span>
</span><span id="line-297"></span><span>     </span><span class="annot"><span class="annottext">MVar () -&gt; IO ()
forall a. MVar a -&gt; IO a
</span><a href="../../base/src/GHC.MVar.html#takeMVar"><span class="hs-identifier hs-var">takeMVar</span></a></span><span> </span><span class="annot"><span class="annottext">MVar ()
</span><a href="#local-6989586621679096868"><span class="hs-identifier hs-var">breakMVar</span></a></span><span>
</span><span id="line-298"></span><span>
</span><span id="line-299"></span><span>   </span><span id="local-6989586621679096863"><span class="annot"><span class="annottext">resetBreakAction :: StablePtr a -&gt; IO ()
</span><a href="#local-6989586621679096863"><span class="hs-identifier hs-var hs-var">resetBreakAction</span></a></span></span><span> </span><span id="local-6989586621679096839"><span class="annot"><span class="annottext">StablePtr a
</span><a href="#local-6989586621679096839"><span class="hs-identifier hs-var">stablePtr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-300"></span><span>     </span><span class="annot"><span class="annottext">Ptr (StablePtr BreakpointCallback)
-&gt; StablePtr BreakpointCallback -&gt; IO ()
forall a. Storable a =&gt; Ptr a -&gt; a -&gt; IO ()
</span><a href="../../base/src/Foreign.Storable.html#poke"><span class="hs-identifier hs-var">poke</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr (StablePtr BreakpointCallback)
</span><a href="GHCi.Run.html#breakPointIOAction"><span class="hs-identifier hs-var">breakPointIOAction</span></a></span><span> </span><span class="annot"><span class="annottext">StablePtr BreakpointCallback
</span><a href="GHCi.Run.html#noBreakStablePtr"><span class="hs-identifier hs-var">noBreakStablePtr</span></a></span><span>
</span><span id="line-301"></span><span>     </span><span class="annot"><span class="annottext">Ptr CInt -&gt; CInt -&gt; IO ()
forall a. Storable a =&gt; Ptr a -&gt; a -&gt; IO ()
</span><a href="../../base/src/Foreign.Storable.html#poke"><span class="hs-identifier hs-var">poke</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr CInt
</span><a href="GHCi.Run.html#exceptionFlag"><span class="hs-identifier hs-var">exceptionFlag</span></a></span><span> </span><span class="annot"><span class="annottext">CInt
</span><span class="hs-number">0</span></span><span>
</span><span id="line-302"></span><span>     </span><span class="annot"><span class="annottext">IO ()
</span><a href="GHCi.Run.html#resetStepFlag"><span class="hs-identifier hs-var">resetStepFlag</span></a></span><span>
</span><span id="line-303"></span><span>     </span><span class="annot"><span class="annottext">StablePtr a -&gt; IO ()
forall {a}. StablePtr a -&gt; IO ()
</span><a href="../../base/src/GHC.Stable.html#freeStablePtr"><span class="hs-identifier hs-var">freeStablePtr</span></a></span><span> </span><span class="annot"><span class="annottext">StablePtr a
</span><a href="#local-6989586621679096839"><span class="hs-identifier hs-var">stablePtr</span></a></span><span>
</span><span id="line-304"></span><span>
</span><span id="line-305"></span><span class="annot"><a href="GHCi.Run.html#resumeStmt"><span class="hs-identifier hs-type">resumeStmt</span></a></span><span>
</span><span id="line-306"></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHCi.Message.html#EvalOpts"><span class="hs-identifier hs-type">EvalOpts</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHCi.RemoteTypes.html#RemoteRef"><span class="hs-identifier hs-type">RemoteRef</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHCi.Message.html#ResumeContext"><span class="hs-identifier hs-type">ResumeContext</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHCi.RemoteTypes.html#HValueRef"><span class="hs-identifier hs-type">HValueRef</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-307"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHCi.Message.html#EvalStatus"><span class="hs-identifier hs-type">EvalStatus</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHCi.RemoteTypes.html#HValueRef"><span class="hs-identifier hs-type">HValueRef</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-308"></span><span id="resumeStmt"><span class="annot"><span class="annottext">resumeStmt :: EvalOpts
-&gt; RemoteRef (ResumeContext [HValueRef])
-&gt; IO (EvalStatus_ [HValueRef] [HValueRef])
</span><a href="GHCi.Run.html#resumeStmt"><span class="hs-identifier hs-var hs-var">resumeStmt</span></a></span></span><span> </span><span id="local-6989586621679096835"><span class="annot"><span class="annottext">EvalOpts
</span><a href="#local-6989586621679096835"><span class="hs-identifier hs-var">opts</span></a></span></span><span> </span><span id="local-6989586621679096834"><span class="annot"><span class="annottext">RemoteRef (ResumeContext [HValueRef])
</span><a href="#local-6989586621679096834"><span class="hs-identifier hs-var">hvref</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-309"></span><span>  </span><span class="annot"><a href="GHCi.Message.html#ResumeContext"><span class="hs-identifier hs-type">ResumeContext</span></a></span><span class="hs-special">{</span><span id="local-6989586621679096831"><span id="local-6989586621679096832"><span id="local-6989586621679096833"><span class="annot"><span class="annottext">ThreadId
MVar ()
MVar (EvalStatus_ [HValueRef] [HValueRef])
resumeThreadId :: ThreadId
resumeStatusMVar :: MVar (EvalStatus_ [HValueRef] [HValueRef])
resumeBreakMVar :: MVar ()
resumeThreadId :: forall a. ResumeContext a -&gt; ThreadId
resumeStatusMVar :: forall a. ResumeContext a -&gt; MVar (EvalStatus a)
resumeBreakMVar :: forall a. ResumeContext a -&gt; MVar ()
</span><a href="#local-6989586621679096831"><span class="hs-glyph hs-var hs-var hs-var hs-var hs-var hs-var">..</span></a></span></span></span></span><span class="hs-special">}</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RemoteRef (ResumeContext [HValueRef])
-&gt; IO (ResumeContext [HValueRef])
forall a. RemoteRef a -&gt; IO a
</span><a href="GHCi.RemoteTypes.html#localRef"><span class="hs-identifier hs-var">localRef</span></a></span><span> </span><span class="annot"><span class="annottext">RemoteRef (ResumeContext [HValueRef])
</span><a href="#local-6989586621679096834"><span class="hs-identifier hs-var">hvref</span></a></span><span>
</span><span id="line-310"></span><span>  </span><span class="annot"><span class="annottext">EvalOpts
-&gt; MVar ()
-&gt; MVar (EvalStatus_ [HValueRef] [HValueRef])
-&gt; IO (EvalStatus_ [HValueRef] [HValueRef])
-&gt; IO (EvalStatus_ [HValueRef] [HValueRef])
forall b a.
EvalOpts -&gt; MVar () -&gt; MVar (EvalStatus b) -&gt; IO a -&gt; IO a
</span><a href="GHCi.Run.html#withBreakAction"><span class="hs-identifier hs-var">withBreakAction</span></a></span><span> </span><span class="annot"><span class="annottext">EvalOpts
</span><a href="#local-6989586621679096835"><span class="hs-identifier hs-var">opts</span></a></span><span> </span><span class="annot"><span class="annottext">MVar ()
</span><a href="#local-6989586621679096833"><span class="hs-identifier hs-var">resumeBreakMVar</span></a></span><span> </span><span class="annot"><span class="annottext">MVar (EvalStatus_ [HValueRef] [HValueRef])
</span><a href="#local-6989586621679096832"><span class="hs-identifier hs-var">resumeStatusMVar</span></a></span><span> </span><span class="annot"><span class="annottext">(IO (EvalStatus_ [HValueRef] [HValueRef])
 -&gt; IO (EvalStatus_ [HValueRef] [HValueRef]))
-&gt; IO (EvalStatus_ [HValueRef] [HValueRef])
-&gt; IO (EvalStatus_ [HValueRef] [HValueRef])
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-311"></span><span>    </span><span class="annot"><span class="annottext">IO (EvalStatus_ [HValueRef] [HValueRef])
-&gt; IO (EvalStatus_ [HValueRef] [HValueRef])
forall a. IO a -&gt; IO a
</span><a href="../../base/src/GHC.IO.html#mask_"><span class="hs-identifier hs-var">mask_</span></a></span><span> </span><span class="annot"><span class="annottext">(IO (EvalStatus_ [HValueRef] [HValueRef])
 -&gt; IO (EvalStatus_ [HValueRef] [HValueRef]))
-&gt; IO (EvalStatus_ [HValueRef] [HValueRef])
-&gt; IO (EvalStatus_ [HValueRef] [HValueRef])
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-312"></span><span>      </span><span class="annot"><span class="annottext">MVar () -&gt; () -&gt; IO ()
forall a. MVar a -&gt; a -&gt; IO ()
</span><a href="../../base/src/GHC.MVar.html#putMVar"><span class="hs-identifier hs-var">putMVar</span></a></span><span> </span><span class="annot"><span class="annottext">MVar ()
</span><a href="#local-6989586621679096833"><span class="hs-identifier hs-var">resumeBreakMVar</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span> </span><span class="hs-comment">-- this awakens the stopped thread...</span><span>
</span><span id="line-313"></span><span>      </span><span class="annot"><span class="annottext">ThreadId
-&gt; IO (EvalStatus_ [HValueRef] [HValueRef])
-&gt; IO (EvalStatus_ [HValueRef] [HValueRef])
forall a. ThreadId -&gt; IO a -&gt; IO a
</span><a href="GHCi.Run.html#redirectInterrupts"><span class="hs-identifier hs-var">redirectInterrupts</span></a></span><span> </span><span class="annot"><span class="annottext">ThreadId
</span><a href="#local-6989586621679096831"><span class="hs-identifier hs-var">resumeThreadId</span></a></span><span> </span><span class="annot"><span class="annottext">(IO (EvalStatus_ [HValueRef] [HValueRef])
 -&gt; IO (EvalStatus_ [HValueRef] [HValueRef]))
-&gt; IO (EvalStatus_ [HValueRef] [HValueRef])
-&gt; IO (EvalStatus_ [HValueRef] [HValueRef])
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">MVar (EvalStatus_ [HValueRef] [HValueRef])
-&gt; IO (EvalStatus_ [HValueRef] [HValueRef])
forall a. MVar a -&gt; IO a
</span><a href="../../base/src/GHC.MVar.html#takeMVar"><span class="hs-identifier hs-var">takeMVar</span></a></span><span> </span><span class="annot"><span class="annottext">MVar (EvalStatus_ [HValueRef] [HValueRef])
</span><a href="#local-6989586621679096832"><span class="hs-identifier hs-var">resumeStatusMVar</span></a></span><span>
</span><span id="line-314"></span><span>
</span><span id="line-315"></span><span class="hs-comment">-- when abandoning a computation we have to</span><span>
</span><span id="line-316"></span><span class="hs-comment">--      (a) kill the thread with an async exception, so that the</span><span>
</span><span id="line-317"></span><span class="hs-comment">--          computation itself is stopped, and</span><span>
</span><span id="line-318"></span><span class="hs-comment">--      (b) fill in the MVar.  This step is necessary because any</span><span>
</span><span id="line-319"></span><span class="hs-comment">--          thunks that were under evaluation will now be updated</span><span>
</span><span id="line-320"></span><span class="hs-comment">--          with the partial computation, which still ends in takeMVar,</span><span>
</span><span id="line-321"></span><span class="hs-comment">--          so any attempt to evaluate one of these thunks will block</span><span>
</span><span id="line-322"></span><span class="hs-comment">--          unless we fill in the MVar.</span><span>
</span><span id="line-323"></span><span class="hs-comment">--      (c) wait for the thread to terminate by taking its status MVar.  This</span><span>
</span><span id="line-324"></span><span class="hs-comment">--          step is necessary to prevent race conditions with</span><span>
</span><span id="line-325"></span><span class="hs-comment">--          -fbreak-on-exception (see #5975).</span><span>
</span><span id="line-326"></span><span class="hs-comment">--  See test break010.</span><span>
</span><span id="line-327"></span><span class="annot"><a href="GHCi.Run.html#abandonStmt"><span class="hs-identifier hs-type">abandonStmt</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHCi.RemoteTypes.html#RemoteRef"><span class="hs-identifier hs-type">RemoteRef</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHCi.Message.html#ResumeContext"><span class="hs-identifier hs-type">ResumeContext</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHCi.RemoteTypes.html#HValueRef"><span class="hs-identifier hs-type">HValueRef</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-328"></span><span id="abandonStmt"><span class="annot"><span class="annottext">abandonStmt :: RemoteRef (ResumeContext [HValueRef]) -&gt; IO ()
</span><a href="GHCi.Run.html#abandonStmt"><span class="hs-identifier hs-var hs-var">abandonStmt</span></a></span></span><span> </span><span id="local-6989586621679096830"><span class="annot"><span class="annottext">RemoteRef (ResumeContext [HValueRef])
</span><a href="#local-6989586621679096830"><span class="hs-identifier hs-var">hvref</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-329"></span><span>  </span><span class="annot"><a href="GHCi.Message.html#ResumeContext"><span class="hs-identifier hs-type">ResumeContext</span></a></span><span class="hs-special">{</span><span id="local-6989586621679096827"><span id="local-6989586621679096828"><span id="local-6989586621679096829"><span class="annot"><span class="annottext">ThreadId
MVar ()
MVar (EvalStatus_ [HValueRef] [HValueRef])
resumeThreadId :: ThreadId
resumeStatusMVar :: MVar (EvalStatus_ [HValueRef] [HValueRef])
resumeBreakMVar :: MVar ()
resumeThreadId :: forall a. ResumeContext a -&gt; ThreadId
resumeStatusMVar :: forall a. ResumeContext a -&gt; MVar (EvalStatus a)
resumeBreakMVar :: forall a. ResumeContext a -&gt; MVar ()
</span><a href="#local-6989586621679096827"><span class="hs-glyph hs-var hs-var hs-var hs-var hs-var hs-var">..</span></a></span></span></span></span><span class="hs-special">}</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RemoteRef (ResumeContext [HValueRef])
-&gt; IO (ResumeContext [HValueRef])
forall a. RemoteRef a -&gt; IO a
</span><a href="GHCi.RemoteTypes.html#localRef"><span class="hs-identifier hs-var">localRef</span></a></span><span> </span><span class="annot"><span class="annottext">RemoteRef (ResumeContext [HValueRef])
</span><a href="#local-6989586621679096830"><span class="hs-identifier hs-var">hvref</span></a></span><span>
</span><span id="line-330"></span><span>  </span><span class="annot"><span class="annottext">ThreadId -&gt; IO ()
</span><a href="../../base/src/GHC.Conc.Sync.html#killThread"><span class="hs-identifier hs-var">killThread</span></a></span><span> </span><span class="annot"><span class="annottext">ThreadId
</span><a href="#local-6989586621679096827"><span class="hs-identifier hs-var">resumeThreadId</span></a></span><span>
</span><span id="line-331"></span><span>  </span><span class="annot"><span class="annottext">MVar () -&gt; () -&gt; IO ()
forall a. MVar a -&gt; a -&gt; IO ()
</span><a href="../../base/src/GHC.MVar.html#putMVar"><span class="hs-identifier hs-var">putMVar</span></a></span><span> </span><span class="annot"><span class="annottext">MVar ()
</span><a href="#local-6989586621679096829"><span class="hs-identifier hs-var">resumeBreakMVar</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-332"></span><span>  </span><span class="annot"><span class="annottext">EvalStatus_ [HValueRef] [HValueRef]
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">MVar (EvalStatus_ [HValueRef] [HValueRef])
-&gt; IO (EvalStatus_ [HValueRef] [HValueRef])
forall a. MVar a -&gt; IO a
</span><a href="../../base/src/GHC.MVar.html#takeMVar"><span class="hs-identifier hs-var">takeMVar</span></a></span><span> </span><span class="annot"><span class="annottext">MVar (EvalStatus_ [HValueRef] [HValueRef])
</span><a href="#local-6989586621679096828"><span class="hs-identifier hs-var">resumeStatusMVar</span></a></span><span>
</span><span id="line-333"></span><span>  </span><span class="annot"><span class="annottext">() -&gt; IO ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-334"></span><span>
</span><span id="line-335"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-string">&quot;&amp;rts_stop_next_breakpoint&quot;</span></span><span> </span><span id="stepFlag"><span class="annot"><a href="GHCi.Run.html#stepFlag"><span class="hs-identifier hs-var">stepFlag</span></a></span></span><span>      </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Ptr.html#Ptr"><span class="hs-identifier hs-type">Ptr</span></a></span><span> </span><span class="annot"><a href="../../base/src/Foreign.C.Types.html#CInt"><span class="hs-identifier hs-type">CInt</span></a></span><span>
</span><span id="line-336"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-string">&quot;&amp;rts_stop_on_exception&quot;</span></span><span>    </span><span id="exceptionFlag"><span class="annot"><a href="GHCi.Run.html#exceptionFlag"><span class="hs-identifier hs-var">exceptionFlag</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Ptr.html#Ptr"><span class="hs-identifier hs-type">Ptr</span></a></span><span> </span><span class="annot"><a href="../../base/src/Foreign.C.Types.html#CInt"><span class="hs-identifier hs-type">CInt</span></a></span><span>
</span><span id="line-337"></span><span>
</span><span id="line-338"></span><span class="annot"><a href="GHCi.Run.html#setStepFlag"><span class="hs-identifier hs-type">setStepFlag</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-339"></span><span id="setStepFlag"><span class="annot"><span class="annottext">setStepFlag :: IO ()
</span><a href="GHCi.Run.html#setStepFlag"><span class="hs-identifier hs-var hs-var">setStepFlag</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Ptr CInt -&gt; CInt -&gt; IO ()
forall a. Storable a =&gt; Ptr a -&gt; a -&gt; IO ()
</span><a href="../../base/src/Foreign.Storable.html#poke"><span class="hs-identifier hs-var">poke</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr CInt
</span><a href="GHCi.Run.html#stepFlag"><span class="hs-identifier hs-var">stepFlag</span></a></span><span> </span><span class="annot"><span class="annottext">CInt
</span><span class="hs-number">1</span></span><span>
</span><span id="line-340"></span><span class="annot"><a href="GHCi.Run.html#resetStepFlag"><span class="hs-identifier hs-type">resetStepFlag</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-341"></span><span id="resetStepFlag"><span class="annot"><span class="annottext">resetStepFlag :: IO ()
</span><a href="GHCi.Run.html#resetStepFlag"><span class="hs-identifier hs-var hs-var">resetStepFlag</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Ptr CInt -&gt; CInt -&gt; IO ()
forall a. Storable a =&gt; Ptr a -&gt; a -&gt; IO ()
</span><a href="../../base/src/Foreign.Storable.html#poke"><span class="hs-identifier hs-var">poke</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr CInt
</span><a href="GHCi.Run.html#stepFlag"><span class="hs-identifier hs-var">stepFlag</span></a></span><span> </span><span class="annot"><span class="annottext">CInt
</span><span class="hs-number">0</span></span><span>
</span><span id="line-342"></span><span>
</span><span id="line-343"></span><span class="hs-keyword">type</span><span> </span><span id="BreakpointCallback"><span class="annot"><a href="GHCi.Run.html#BreakpointCallback"><span class="hs-identifier hs-var">BreakpointCallback</span></a></span></span><span>
</span><span id="line-344"></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int#</span></span><span>    </span><span class="hs-comment">-- the breakpoint index</span><span>
</span><span id="line-345"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int#</span></span><span>    </span><span class="hs-comment">-- the module uniq</span><span>
</span><span id="line-346"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>    </span><span class="hs-comment">-- exception?</span><span>
</span><span id="line-347"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHCi.RemoteTypes.html#HValue"><span class="hs-identifier hs-type">HValue</span></a></span><span>  </span><span class="hs-comment">-- the AP_STACK, or exception</span><span>
</span><span id="line-348"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-349"></span><span>
</span><span id="line-350"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-string">&quot;&amp;rts_breakpoint_io_action&quot;</span></span><span>
</span><span id="line-351"></span><span>   </span><span id="breakPointIOAction"><span class="annot"><a href="GHCi.Run.html#breakPointIOAction"><span class="hs-identifier hs-var">breakPointIOAction</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Ptr.html#Ptr"><span class="hs-identifier hs-type">Ptr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Stable.html#StablePtr"><span class="hs-identifier hs-type">StablePtr</span></a></span><span> </span><span class="annot"><a href="GHCi.Run.html#BreakpointCallback"><span class="hs-identifier hs-type">BreakpointCallback</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-352"></span><span>
</span><span id="line-353"></span><span class="annot"><a href="GHCi.Run.html#noBreakStablePtr"><span class="hs-identifier hs-type">noBreakStablePtr</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Stable.html#StablePtr"><span class="hs-identifier hs-type">StablePtr</span></a></span><span> </span><span class="annot"><a href="GHCi.Run.html#BreakpointCallback"><span class="hs-identifier hs-type">BreakpointCallback</span></a></span><span>
</span><span id="line-354"></span><span id="noBreakStablePtr"><span class="annot"><span class="annottext">noBreakStablePtr :: StablePtr BreakpointCallback
</span><a href="GHCi.Run.html#noBreakStablePtr"><span class="hs-identifier hs-var hs-var">noBreakStablePtr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IO (StablePtr BreakpointCallback) -&gt; StablePtr BreakpointCallback
forall a. IO a -&gt; a
</span><a href="../../base/src/GHC.IO.Unsafe.html#unsafePerformIO"><span class="hs-identifier hs-var">unsafePerformIO</span></a></span><span> </span><span class="annot"><span class="annottext">(IO (StablePtr BreakpointCallback) -&gt; StablePtr BreakpointCallback)
-&gt; IO (StablePtr BreakpointCallback)
-&gt; StablePtr BreakpointCallback
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">BreakpointCallback -&gt; IO (StablePtr BreakpointCallback)
forall a. a -&gt; IO (StablePtr a)
</span><a href="../../base/src/GHC.Stable.html#newStablePtr"><span class="hs-identifier hs-var">newStablePtr</span></a></span><span> </span><span class="annot"><span class="annottext">BreakpointCallback
</span><a href="GHCi.Run.html#noBreakAction"><span class="hs-identifier hs-var">noBreakAction</span></a></span><span>
</span><span id="line-355"></span><span>
</span><span id="line-356"></span><span class="annot"><a href="GHCi.Run.html#noBreakAction"><span class="hs-identifier hs-type">noBreakAction</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHCi.Run.html#BreakpointCallback"><span class="hs-identifier hs-type">BreakpointCallback</span></a></span><span>
</span><span id="line-357"></span><span id="noBreakAction"><span class="annot"><span class="annottext">noBreakAction :: BreakpointCallback
</span><a href="GHCi.Run.html#noBreakAction"><span class="hs-identifier hs-var hs-var">noBreakAction</span></a></span></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="annot"><span class="annottext">HValue
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; IO ()
</span><a href="../../base/src/System.IO.html#putStrLn"><span class="hs-identifier hs-var">putStrLn</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;*** Ignoring breakpoint&quot;</span></span><span>
</span><span id="line-358"></span><span class="annot"><a href="GHCi.Run.html#noBreakAction"><span class="hs-identifier hs-var">noBreakAction</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>  </span><span class="annot"><span class="annottext">HValue
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">() -&gt; IO ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span> </span><span class="hs-comment">-- exception: just continue</span><span>
</span><span id="line-359"></span><span>
</span><span id="line-360"></span><span class="hs-comment">-- Malloc and copy the bytes.  We don't have any way to monitor the</span><span>
</span><span id="line-361"></span><span class="hs-comment">-- lifetime of this memory, so it just leaks.</span><span>
</span><span id="line-362"></span><span class="annot"><a href="GHCi.Run.html#mkString"><span class="hs-identifier hs-type">mkString</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Internal.html#ByteString"><span class="hs-identifier hs-type">ByteString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHCi.RemoteTypes.html#RemotePtr"><span class="hs-identifier hs-type">RemotePtr</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-363"></span><span id="mkString"><span class="annot"><span class="annottext">mkString :: ByteString -&gt; IO (RemotePtr ())
</span><a href="GHCi.Run.html#mkString"><span class="hs-identifier hs-var hs-var">mkString</span></a></span></span><span> </span><span id="local-6989586621679096821"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679096821"><span class="hs-identifier hs-var">bs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ByteString
-&gt; (CStringLen -&gt; IO (RemotePtr ())) -&gt; IO (RemotePtr ())
forall a. ByteString -&gt; (CStringLen -&gt; IO a) -&gt; IO a
</span><a href="../../bytestring/src/Data.ByteString.Unsafe.html#unsafeUseAsCStringLen"><span class="hs-identifier hs-var">B.unsafeUseAsCStringLen</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679096821"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="annot"><span class="annottext">((CStringLen -&gt; IO (RemotePtr ())) -&gt; IO (RemotePtr ()))
-&gt; (CStringLen -&gt; IO (RemotePtr ())) -&gt; IO (RemotePtr ())
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span class="hs-special">(</span><span id="local-6989586621679096819"><span class="annot"><span class="annottext">Ptr CChar
</span><a href="#local-6989586621679096819"><span class="hs-identifier hs-var">cstr</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679096818"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679096818"><span class="hs-identifier hs-var">len</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-364"></span><span>  </span><span id="local-6989586621679096817"><span class="annot"><span class="annottext">Ptr CChar
</span><a href="#local-6989586621679096817"><span class="hs-identifier hs-var">ptr</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Int -&gt; IO (Ptr CChar)
forall a. Int -&gt; IO (Ptr a)
</span><a href="../../base/src/Foreign.Marshal.Alloc.html#mallocBytes"><span class="hs-identifier hs-var">mallocBytes</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679096818"><span class="hs-identifier hs-var">len</span></a></span><span>
</span><span id="line-365"></span><span>  </span><span class="annot"><span class="annottext">Ptr CChar -&gt; Ptr CChar -&gt; Int -&gt; IO ()
forall a. Ptr a -&gt; Ptr a -&gt; Int -&gt; IO ()
</span><a href="../../base/src/Foreign.Marshal.Utils.html#copyBytes"><span class="hs-identifier hs-var">copyBytes</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr CChar
</span><a href="#local-6989586621679096817"><span class="hs-identifier hs-var">ptr</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr CChar
</span><a href="#local-6989586621679096819"><span class="hs-identifier hs-var">cstr</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679096818"><span class="hs-identifier hs-var">len</span></a></span><span>
</span><span id="line-366"></span><span>  </span><span class="annot"><span class="annottext">RemotePtr () -&gt; IO (RemotePtr ())
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RemotePtr CChar -&gt; RemotePtr ()
forall a b. RemotePtr a -&gt; RemotePtr b
</span><a href="GHCi.RemoteTypes.html#castRemotePtr"><span class="hs-identifier hs-var">castRemotePtr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Ptr CChar -&gt; RemotePtr CChar
forall a. Ptr a -&gt; RemotePtr a
</span><a href="GHCi.RemoteTypes.html#toRemotePtr"><span class="hs-identifier hs-var">toRemotePtr</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr CChar
</span><a href="#local-6989586621679096817"><span class="hs-identifier hs-var">ptr</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-367"></span><span>
</span><span id="line-368"></span><span class="annot"><a href="GHCi.Run.html#mkString0"><span class="hs-identifier hs-type">mkString0</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Internal.html#ByteString"><span class="hs-identifier hs-type">ByteString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHCi.RemoteTypes.html#RemotePtr"><span class="hs-identifier hs-type">RemotePtr</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-369"></span><span id="mkString0"><span class="annot"><span class="annottext">mkString0 :: ByteString -&gt; IO (RemotePtr ())
</span><a href="GHCi.Run.html#mkString0"><span class="hs-identifier hs-var hs-var">mkString0</span></a></span></span><span> </span><span id="local-6989586621679096813"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679096813"><span class="hs-identifier hs-var">bs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ByteString
-&gt; (CStringLen -&gt; IO (RemotePtr ())) -&gt; IO (RemotePtr ())
forall a. ByteString -&gt; (CStringLen -&gt; IO a) -&gt; IO a
</span><a href="../../bytestring/src/Data.ByteString.Unsafe.html#unsafeUseAsCStringLen"><span class="hs-identifier hs-var">B.unsafeUseAsCStringLen</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679096813"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="annot"><span class="annottext">((CStringLen -&gt; IO (RemotePtr ())) -&gt; IO (RemotePtr ()))
-&gt; (CStringLen -&gt; IO (RemotePtr ())) -&gt; IO (RemotePtr ())
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span class="hs-special">(</span><span id="local-6989586621679096812"><span class="annot"><span class="annottext">Ptr CChar
</span><a href="#local-6989586621679096812"><span class="hs-identifier hs-var">cstr</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679096811"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679096811"><span class="hs-identifier hs-var">len</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-370"></span><span>  </span><span id="local-6989586621679096810"><span class="annot"><span class="annottext">Ptr CChar
</span><a href="#local-6989586621679096810"><span class="hs-identifier hs-var">ptr</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Int -&gt; IO (Ptr CChar)
forall a. Int -&gt; IO (Ptr a)
</span><a href="../../base/src/Foreign.Marshal.Alloc.html#mallocBytes"><span class="hs-identifier hs-var">mallocBytes</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679096811"><span class="hs-identifier hs-var">len</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span>
</span><span id="line-371"></span><span>  </span><span class="annot"><span class="annottext">Ptr CChar -&gt; Ptr CChar -&gt; Int -&gt; IO ()
forall a. Ptr a -&gt; Ptr a -&gt; Int -&gt; IO ()
</span><a href="../../base/src/Foreign.Marshal.Utils.html#copyBytes"><span class="hs-identifier hs-var">copyBytes</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr CChar
</span><a href="#local-6989586621679096810"><span class="hs-identifier hs-var">ptr</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr CChar
</span><a href="#local-6989586621679096812"><span class="hs-identifier hs-var">cstr</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679096811"><span class="hs-identifier hs-var">len</span></a></span><span>
</span><span id="line-372"></span><span>  </span><span class="annot"><span class="annottext">Ptr CChar -&gt; Int -&gt; CChar -&gt; IO ()
forall a. Storable a =&gt; Ptr a -&gt; Int -&gt; a -&gt; IO ()
</span><a href="../../base/src/Foreign.Storable.html#pokeElemOff"><span class="hs-identifier hs-var">pokeElemOff</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Ptr CChar
</span><a href="#local-6989586621679096810"><span class="hs-identifier hs-var">ptr</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Ptr.html#Ptr"><span class="hs-identifier hs-type">Ptr</span></a></span><span> </span><span class="annot"><a href="../../base/src/Foreign.C.Types.html#CChar"><span class="hs-identifier hs-type">CChar</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679096811"><span class="hs-identifier hs-var">len</span></a></span><span> </span><span class="annot"><span class="annottext">CChar
</span><span class="hs-number">0</span></span><span>
</span><span id="line-373"></span><span>  </span><span class="annot"><span class="annottext">RemotePtr () -&gt; IO (RemotePtr ())
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RemotePtr CChar -&gt; RemotePtr ()
forall a b. RemotePtr a -&gt; RemotePtr b
</span><a href="GHCi.RemoteTypes.html#castRemotePtr"><span class="hs-identifier hs-var">castRemotePtr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Ptr CChar -&gt; RemotePtr CChar
forall a. Ptr a -&gt; RemotePtr a
</span><a href="GHCi.RemoteTypes.html#toRemotePtr"><span class="hs-identifier hs-var">toRemotePtr</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr CChar
</span><a href="#local-6989586621679096810"><span class="hs-identifier hs-var">ptr</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-374"></span><span>
</span><span id="line-375"></span><span class="annot"><a href="GHCi.Run.html#mkCostCentres"><span class="hs-identifier hs-type">mkCostCentres</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">,</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHCi.RemoteTypes.html#RemotePtr"><span class="hs-identifier hs-type">RemotePtr</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Stack.CCS.html#CostCentre"><span class="hs-identifier hs-type">CostCentre</span></a></span><span class="hs-special">]</span><span class="hs-cpp">
#if defined(PROFILING)
</span><span class="hs-identifier">mkCostCentres</span><span> </span><span class="hs-identifier">mod</span><span> </span><span class="hs-identifier">ccs</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-378"></span><span>  </span><span class="hs-identifier">c_module</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-identifier">newCString</span><span> </span><span class="hs-identifier">mod</span><span>
</span><span id="line-379"></span><span>  </span><span class="hs-identifier">mapM</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">mk_one</span><span> </span><span class="hs-identifier">c_module</span><span class="hs-special">)</span><span> </span><span class="hs-identifier">ccs</span><span>
</span><span id="line-380"></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-381"></span><span>  </span><span class="hs-identifier">mk_one</span><span> </span><span class="hs-identifier">c_module</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">decl_path</span><span class="hs-special">,</span><span class="hs-identifier">srcspan</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-382"></span><span>    </span><span class="hs-identifier">c_name</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-identifier">newCString</span><span> </span><span class="hs-identifier">decl_path</span><span>
</span><span id="line-383"></span><span>    </span><span class="hs-identifier">c_srcspan</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-identifier">newCString</span><span> </span><span class="hs-identifier">srcspan</span><span>
</span><span id="line-384"></span><span>    </span><span class="hs-identifier">toRemotePtr</span><span> </span><span class="hs-operator">&lt;$&gt;</span><span> </span><span class="hs-identifier">c_mkCostCentre</span><span> </span><span class="hs-identifier">c_name</span><span> </span><span class="hs-identifier">c_module</span><span> </span><span class="hs-identifier">c_srcspan</span><span>
</span><span id="line-385"></span><span>
</span><span id="line-386"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">ccall</span><span> </span><span class="hs-keyword">unsafe</span><span> </span><span class="hs-string">&quot;mkCostCentre&quot;</span><span>
</span><span id="line-387"></span><span>  </span><span class="hs-identifier">c_mkCostCentre</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">Ptr</span><span> </span><span class="hs-identifier">CChar</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">Ptr</span><span> </span><span class="hs-identifier">CChar</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">Ptr</span><span> </span><span class="hs-identifier">CChar</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">IO</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">Ptr</span><span> </span><span class="hs-identifier">CostCentre</span><span class="hs-special">)</span><span class="hs-cpp">
#else
</span><span id="mkCostCentres"><span class="annot"><span class="annottext">mkCostCentres :: String -&gt; [(String, String)] -&gt; IO [RemotePtr CostCentre]
</span><a href="GHCi.Run.html#mkCostCentres"><span class="hs-identifier hs-var hs-var">mkCostCentres</span></a></span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[(String, String)]
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[RemotePtr CostCentre] -&gt; IO [RemotePtr CostCentre]
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-cpp">
#endif
</span><span>
</span><span id="line-392"></span><span class="annot"><a href="GHCi.Run.html#getIdValFromApStack"><span class="hs-identifier hs-type">getIdValFromApStack</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHCi.RemoteTypes.html#HValue"><span class="hs-identifier hs-type">HValue</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHCi.RemoteTypes.html#HValue"><span class="hs-identifier hs-type">HValue</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-393"></span><span id="getIdValFromApStack"><span class="annot"><span class="annottext">getIdValFromApStack :: HValue -&gt; Int -&gt; IO (Maybe HValue)
</span><a href="GHCi.Run.html#getIdValFromApStack"><span class="hs-identifier hs-var hs-var">getIdValFromApStack</span></a></span></span><span> </span><span id="local-6989586621679096807"><span class="annot"><span class="annottext">HValue
</span><a href="#local-6989586621679096807"><span class="hs-identifier hs-var">apStack</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="hs-identifier hs-type">I#</span></span><span> </span><span id="local-6989586621679096806"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679096806"><span class="hs-identifier hs-var">stackDepth</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-394"></span><span>   </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">HValue -&gt; Int# -&gt; (# Int#, Any #)
forall a b. a -&gt; Int# -&gt; (# Int#, b #)
</span><span class="hs-identifier hs-var">getApStackVal#</span></span><span> </span><span class="annot"><span class="annottext">HValue
</span><a href="#local-6989586621679096807"><span class="hs-identifier hs-var">apStack</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679096806"><span class="hs-identifier hs-var">stackDepth</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-395"></span><span>        </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679096805"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679096805"><span class="hs-identifier hs-var">ok</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679096804"><span class="annot"><span class="annottext">Any
</span><a href="#local-6989586621679096804"><span class="hs-identifier hs-var">result</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-396"></span><span>            </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679096805"><span class="hs-identifier hs-var">ok</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-397"></span><span>              </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0#</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe HValue -&gt; IO (Maybe HValue)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe HValue
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-comment">-- AP_STACK not found</span><span>
</span><span id="line-398"></span><span>              </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe HValue -&gt; IO (Maybe HValue)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HValue -&gt; Maybe HValue
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Any -&gt; HValue
</span><a href="../../base/src/Unsafe.Coerce.html#unsafeCoerce%23"><span class="hs-identifier hs-var">unsafeCoerce#</span></a></span><span> </span><span class="annot"><span class="annottext">Any
</span><a href="#local-6989586621679096804"><span class="hs-identifier hs-var">result</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-399"></span></pre></body></html>